From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4 Description of problem: Programs that use of the method java.util.logging.Logger.log(java.util.logging.Level, java.lang.String, java.lang.Object) always fail when executed by gij. This happens both when ecj compiles the bytecode and when Sun JDK 1.4.2 javac compiles the bytecode, so it's probably not an ecj compiler bug, but rather a bug in the class library that gij is using for java.util.logging.Logger. Version-Release number of selected component (if applicable): libgcj-4.0.0-8 How reproducible: Always Steps to Reproduce: Create the HelloLogFails.java source file, compile it with ecj, and run it with gij: cat <<EOF > HelloLogFails.java import java.util.logging.*; public class HelloLogFails { public static final void main (String [] argv) { Logger log = Logger.getLogger(""); log.info("Some simple logging statements work"); log.log(Level.INFO, "{0} fails here, though", "gij"); } } EOF ecj HelloLogFails.java && gij HelloLogFails Actual Results: 30-Jun-05 8:56:36 AM HelloLogFails main INFO: Some simple logging statements work Exception in thread "main" java.lang.NullPointerException at java.lang.Class.getName() (/usr/lib/libgcj.so.6.0.0) at java.util.logging.Logger.getCallerStackFrame() (/usr/lib/libgcj.so.6.0.0) at java.util.logging.Logger.log(java.util.logging.Level, java.lang.String, java.lang.Object) (/usr/lib/libgcj.so.6.0.0) at HelloLogFails.main(java.lang.String[]) (Unknown Source) at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Expected Results: The expected output when the above program is compiled and run with Sun's JDK 1.4.2 is as follows: Jun 30, 2005 8:56:40 AM java.util.logging.LogManager$RootLogger log INFO: Some simple logging statements work Jun 30, 2005 8:56:40 AM java.util.logging.LogManager$RootLogger log INFO: gij fails here, though Additional info:
The upstream project has fixed this very recently: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21775 The bug was severity "critical" in GCC. I've added this URL to this bug to the bug report. The patch is very simple, a one-liner: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21775#c3 The GCC maintainers have fixed this in CVS.
PR21775 is fixed in GCC 4.0.0-10 and above. FC4 GCC errata is planned in a 2-3 weeks timeframe.