bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/109152] New: VMProcess.<init>()/destroy() affect thread i


From: lgcat76 at gmail dot com
Subject: [Bug classpath/109152] New: VMProcess.<init>()/destroy() affect thread interrupt flag
Date: Thu, 16 Mar 2023 06:37:43 +0000

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109152

            Bug ID: 109152
           Summary: VMProcess.<init>()/destroy() affect thread interrupt
                    flag
           Product: classpath
           Version: 0.99
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lgcat76 at gmail dot com
  Target Milestone: ---

VMProcess.<init>()/destroy() affect thread may disable the interrupt flag.

Both methods contain a block of code like this for performing an
uninterruptible wait:


----------------------------------------------------------------
    while (state != TERMINATED) /* or == INITIAL */
      {
        try
          {
            wait();
          }
        catch (InterruptedException e)
          {
            /* ignore */
          }
      }
----------------------------------------------------------------

If the thread is already interrupted when that point is reached, or if it is
interrupted while waiting the interrupt flag will be stay cleared after the
condition is fulfilled and the rest of the code executed by the thread won't
have a chance to know that it has been interrupted.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]