public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/22211] New: Thread.interrupt sometimes causes abort if thread is already dead
@ 2005-06-28  2:30 greenrd at greenrd dot org
  2005-06-28  9:18 ` [Bug libgcj/22211] " greenrd at greenrd dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: greenrd at greenrd dot org @ 2005-06-28  2:30 UTC (permalink / raw)
  To: java-prs

Thread.interrupt does not check if the thread is alive - it just signals the
thread regardless. This sometimes causes a segfault followed by an abort,
because the native thread library gets passed stale data.

Unable to create a reproducable test case - but I would hope it's self-evident
that the existing code in _Jv_ThreadInterrupt is bogus.

To fix this correctly, two things need to happen. (1) When interrupting, don't
do anything if the thread is not alive. (2) Properly synchronize access to the
alive_flag, to avoid races.

-- 
           Summary: Thread.interrupt sometimes causes abort if thread is
                    already dead
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: greenrd at greenrd dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22211


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-08-09  0:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-28  2:30 [Bug libgcj/22211] New: Thread.interrupt sometimes causes abort if thread is already dead greenrd at greenrd dot org
2005-06-28  9:18 ` [Bug libgcj/22211] " greenrd at greenrd dot org
2005-06-28 15:13 ` greenrd at greenrd dot org
2005-06-29 14:50 ` mlists at juma dot me dot uk
2005-06-29 17:06 ` tromey at gcc dot gnu dot org
2005-06-29 17:20 ` greenrd at greenrd dot org
2005-06-29 17:22 ` tromey at gcc dot gnu dot org
2005-06-29 17:36 ` cvs-commit at gcc dot gnu dot org
2005-06-29 17:42 ` tromey at gcc dot gnu dot org
2005-06-29 17:49 ` [Bug libgcj/22211] [4.0 only] " pinskia at gcc dot gnu dot org
2005-08-09  0:11 ` greenrd at greenrd dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).