[Bug libgcj/57074] gcc-4.8.0 libgcj regression on 32bit Power architecture

amodra at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu May 2 08:18:00 GMT 2013


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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #2 from Alan Modra <amodra at gmail dot com> 2013-05-02 08:18:45 UTC ---
BTW, running gkeytool without any args shows the problem too. When libjava is
built with -g -O2, I get

Exception in thread "main" java.lang.NoClassDefFoundError:
gnu.classpath.tools.keytool.Main
   at java.lang.Class.initializeClass(natClass.cc)
Caused by: java.lang.IllegalMonitorStateException: current thread not owner
   at java.lang.Object.notifyAll(natObject.cc:1437)
   at gnu.gcj.runtime.SystemClassLoader.findClass(natSystemClassLoader.cc:29)
   at java.lang.ClassLoader.loadClass(ClassLoader.java)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:387)
   at java.lang.Class.initializeClass(natClass.cc:728)

But note that natObject.cc:1437 is a lie!  The real failure occurs
natObject.cc:1431 and it looks like the two identical throws have merged. 
Putting a break on the right place, I see

(gdb) p this
$8 = (java::lang::Object * const) 0xffc6aec
<gnu::classpath::tools::keytool::Main$ShutdownHook::class$>
(gdb) p/x addr
$9 = 0xffc6aec

Uh oh!  The address is not 8-byte aligned, so one of the flag bits appears to
be set.  This is why we appear to have locking problems.



More information about the Java-prs mailing list