[Bug libgcj/34574] wait() call hangs in _Jv_CondWait taking the monitor with it causing the application to hang
pashev.igor at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 19 20:24:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34574
--- Comment #3 from Igor Pashev <pashev.igor at gmail dot com> ---
Created attachment 31052
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31052&action=edit
Adopted test case
I've made a test case. It work for GCC 4.7 on illumos/amd64 (aka OpenSolaris)
pashev@bok:~/gcj-hang$ make clean
rm -f TestJVSynchronise19thDec
rm -f *.o *.class *.h
pashev@bok:~/gcj-hang$ make
gcj -d . -C ThreadPool.java
ThreadPool.java:30: warning: Collection is a raw type. References to generic
type Collection<E> should be parameterized
Collection assignments = new ArrayList(3);
^^^^^^^^^^
ThreadPool.java:30: warning: ArrayList is a raw type. References to generic
type ArrayList<E> should be parameterized
Collection assignments = new ArrayList(3);
^^^^^^^^^
ThreadPool.java:67: warning: Type safety: The method add(Object) belongs to the
raw type Collection. References to generic type Collection<E> should be
parameterized
assignments.add(r);
^^^^^^^^^^^^^^^^^^
ThreadPool.java:111: warning: The method destroy() from the type Thread is
deprecated
threads[i].destroy();
^^^^^^^^^^^^^^^^^^^^
4 problems (4 warnings)
gcj -d . -C env_test.java
env_test.java:5: warning: The field env_test.taskNumber is never read locally
private int taskNumber;
^^^^^^^^^^
1 problem (1 warning)
gcjh -cp . env_test
gcjh -cp . ThreadPool
g++ -fPIC -I. -c TestJVSynchronise19thDec.cc -o TestJVSynchronise19thDec.o
gcj -o TestJVSynchronise19thDec TestJVSynchronise19thDec.o ThreadPool.java
env_test.java -lstdc++
ThreadPool.java:30: warning: Collection is a raw type. References to generic
type Collection<E> should be parameterized
Collection assignments = new ArrayList(3);
^^^^^^^^^^
ThreadPool.java:30: warning: ArrayList is a raw type. References to generic
type ArrayList<E> should be parameterized
Collection assignments = new ArrayList(3);
^^^^^^^^^
ThreadPool.java:67: warning: Type safety: The method add(Object) belongs to the
raw type Collection. References to generic type Collection<E> should be
parameterized
assignments.add(r);
^^^^^^^^^^^^^^^^^^
ThreadPool.java:111: warning: The method destroy() from the type Thread is
deprecated
threads[i].destroy();
^^^^^^^^^^^^^^^^^^^^
env_test.java:5: warning: The field env_test.taskNumber is never read locally
private int taskNumber;
^^^^^^^^^^
5 problems (5 warnings)
More information about the Gcc-bugs
mailing list