public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/12647] New: wait() bug on Win32
@ 2003-10-16 18:17 mkaufmann at student dot ethz dot ch
2003-10-17 13:38 ` [Bug libgcj/12647] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: mkaufmann at student dot ethz dot ch @ 2003-10-16 18:17 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
Summary: wait() bug on Win32
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mkaufmann at student dot ethz dot ch
CC: gcc-bugs at gcc dot gnu dot org
On Windows (I used the MinGW version 3.3.1 of gcj), there's a bug if a
synchronized method calls wait(). If the method containing wait() was invoked by
another synchronized method of the same object, then the calling thread keeps
the lock on this object.
Example program:
If you run this with the Java 1.4.1 VM on Windows, the output is
a
c
c
c
...
If compiled with GCJ on Windows, the output is only
a
Code of the example program:
public class Test
{
public static void main(String args[])
{
Test test = new Test();
new MyThread(test).start();
while(true)
{
try
{
Thread.sleep(1000);
}
catch (Exception e)
{
e.printStackTrace();
}
test.c();
}
}
public synchronized void a()
{
System.out.println("a");
b();
}
public synchronized void b()
{
try
{
wait();
}
catch (Exception e)
{
e.printStackTrace();
}
System.out.println("b");
}
public synchronized void c()
{
System.out.println("c");
}
}
class MyThread extends Thread
{
private Test test;
public MyThread(Test test)
{
this.test = test;
}
public void run()
{
test.a();
}
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] wait() bug on Win32
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
@ 2003-10-17 13:38 ` pinskia at gcc dot gnu dot org
2003-10-18 17:15 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-17 13:38 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|java |libgcj
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] wait() bug on Win32
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
2003-10-17 13:38 ` [Bug libgcj/12647] " pinskia at gcc dot gnu dot org
@ 2003-10-18 17:15 ` pinskia at gcc dot gnu dot org
2003-10-21 23:59 ` bryce at mckinlay dot net dot nz
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-18 17:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-18 17:06 -------
This works for me on powerpc-apple-darwin on the mainline (20031008), I do not have
access to a Windows machine to try this.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] wait() bug on Win32
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
2003-10-17 13:38 ` [Bug libgcj/12647] " pinskia at gcc dot gnu dot org
2003-10-18 17:15 ` pinskia at gcc dot gnu dot org
@ 2003-10-21 23:59 ` bryce at mckinlay dot net dot nz
2003-10-22 7:27 ` membar at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bryce at mckinlay dot net dot nz @ 2003-10-21 23:59 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
bryce at mckinlay dot net dot nz changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |membar at gcc dot gnu dot
| |org
------- Additional Comments From bryce at mckinlay dot net dot nz 2003-10-21 22:48 -------
Mohan, can you confirm this?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] wait() bug on Win32
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
` (2 preceding siblings ...)
2003-10-21 23:59 ` bryce at mckinlay dot net dot nz
@ 2003-10-22 7:27 ` membar at gcc dot gnu dot org
2003-10-23 9:26 ` [Bug libgcj/12647] [win32] wait() does not release monitor correctly membar at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: membar at gcc dot gnu dot org @ 2003-10-22 7:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
membar at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-22 07:19:51
date| |
------- Additional Comments From membar at gcc dot gnu dot org 2003-10-22 07:19 -------
Confirmed with CVS HEAD (3.4).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] [win32] wait() does not release monitor correctly
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
` (3 preceding siblings ...)
2003-10-22 7:27 ` membar at gcc dot gnu dot org
@ 2003-10-23 9:26 ` membar at gcc dot gnu dot org
2003-10-23 9:32 ` membar at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: membar at gcc dot gnu dot org @ 2003-10-23 9:26 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
membar at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2003-10-22 07:19:51 |2003-10-23 09:25:23
date| |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] [win32] wait() does not release monitor correctly
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
` (4 preceding siblings ...)
2003-10-23 9:26 ` [Bug libgcj/12647] [win32] wait() does not release monitor correctly membar at gcc dot gnu dot org
@ 2003-10-23 9:32 ` membar at gcc dot gnu dot org
2003-10-31 4:43 ` cvs-commit at gcc dot gnu dot org
2003-10-31 5:05 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: membar at gcc dot gnu dot org @ 2003-10-23 9:32 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
membar at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |membar at gcc dot gnu dot
|dot org |org
------- Additional Comments From membar at gcc dot gnu dot org 2003-10-23 09:26 -------
http://gcc.gnu.org/ml/java-patches/2003-q4/msg00224.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] [win32] wait() does not release monitor correctly
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
` (5 preceding siblings ...)
2003-10-23 9:32 ` membar at gcc dot gnu dot org
@ 2003-10-31 4:43 ` cvs-commit at gcc dot gnu dot org
2003-10-31 5:05 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-31 4:43 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-31 03:36 -------
Subject: Bug 12647
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: membar@gcc.gnu.org 2003-10-31 03:36:38
Modified files:
libjava : ChangeLog win32-threads.cc
Log message:
PR libgcj/12647:
* win32-threads.cc (_Jv_CondWait): Respect mutex's
refcount when releasing and reacquiring it.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.2317&r2=1.2318
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/win32-threads.cc.diff?cvsroot=gcc&r1=1.10&r2=1.11
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/12647] [win32] wait() does not release monitor correctly
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
` (6 preceding siblings ...)
2003-10-31 4:43 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-31 5:05 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-31 5:05 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12647
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-31 04:43 -------
Fixed for 3.4.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-10-31 4:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 18:17 [Bug java/12647] New: wait() bug on Win32 mkaufmann at student dot ethz dot ch
2003-10-17 13:38 ` [Bug libgcj/12647] " pinskia at gcc dot gnu dot org
2003-10-18 17:15 ` pinskia at gcc dot gnu dot org
2003-10-21 23:59 ` bryce at mckinlay dot net dot nz
2003-10-22 7:27 ` membar at gcc dot gnu dot org
2003-10-23 9:26 ` [Bug libgcj/12647] [win32] wait() does not release monitor correctly membar at gcc dot gnu dot org
2003-10-23 9:32 ` membar at gcc dot gnu dot org
2003-10-31 4:43 ` cvs-commit at gcc dot gnu dot org
2003-10-31 5:05 ` pinskia at gcc dot gnu 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).