libgcj passes class names to dlopen to find shared libraries implementing the class. In particular, in the case of inner classes, this name will contains '$' characters. However, the Linux dlopen implementation interprets '$' to signify a 'dynamic string token' that is subject to replacement. Currently, Linux implements the dynamic string tokens $ORIGIN and $PLATFORM. Thus, if an inner class happens to be named ORIGIN or PLATFORM, dlopen will substitute those strings, and either the intended shared library will not be found, or possibly even an incorrect library will be loaded. Furthermore, there is a bug in glibc 2.2.5 that causes dlopen to go into an endless loop if the path contains a '$' that is not followed by one of the recognized dynamic string tokens. This causes libgcj to hang whenever it tries to load an inner class. Release: gcc 3.3 Environment: Linux (glibc 2.x, x >= 1)
From: mark@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libgcj/8142 Date: 11 Oct 2002 22:10:37 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mark@gcc.gnu.org 2002-10-11 15:10:37 Modified files: libjava : ChangeLog libjava/java/lang: natClassLoader.cc Log message: Fix for PR libgcj/8142 * java/lang/natClassLoader.cc (findClass): Skip inner classes when loading native modules. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1484&r2=1.1485 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/natClassLoader.cc.diff?cvsroot=gcc&r1=1.51&r2=1.52
Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-Why: I'm handling the administrivia
State-Changed-From-To: open->closed State-Changed-Why: A patch to fix this was checked in