From: Peter G. <pe...@ar...> - 2005-08-31 15:50:23
|
On Wed, 31 Aug 2005 at 14:11:09 +0200, Andras Simon wrote: > > When compiling a file with a dot in its name, I get > > ; Compiling /home/simon/java/jfiles/MidiClasses/bug.bug.cl ... > ; (IN-PACKAGE :CL-USER) > ; (DEFUN FOO ...) > java.lang.ClassFormatError: Illegal class name > "org/armedbear/lisp/bug.bug_1" in > class file <Unknown> > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > at java.lang.ClassLoader.defineClass(ClassLoader.java:465) > at org.armedbear.lisp.JavaClassLoader.loadClassFromByteArray(JavaClassLoader.java:96) > at org.armedbear.lisp.Lisp.loadCompiledFunction(Lisp.java:1021) > at org.armedbear.lisp.Lisp.loadCompiledFunction(Lisp.java:959) > ... > > The following patch seems to work (though I'm not sure if this is the > right thing to do): > > Index: src/org/armedbear/lisp/compile-file.lisp > =================================================================== > RCS file: /cvsroot/armedbear-j/j/j/src/org/armedbear/lisp/compile-file.lisp,v > retrieving revision 1.116 > diff -u -r1.116 compile-file.lisp > --- src/org/armedbear/lisp/compile-file.lisp 27 Aug 2005 13:36:41 > -0000 1.116 +++ src/org/armedbear/lisp/compile-file.lisp 31 > Aug 2005 11:05:11 -0000 @@ -30,7 +30,7 @@ > (declaim (ftype (function () t) next-classfile-name)) > (defun next-classfile-name () > (let ((name (%format nil "~A-~D" > - (pathname-name *output-file-pathname*) > + (substitute #\_ #\. (pathname-name > *output-file-pathname*)) > (incf *class-number*)))) > (namestring (merge-pathnames (make-pathname :name name :type "cls") > *output-file-pathname*)))) > @@ -439,7 +439,7 @@ > (pathnames ())) > (dotimes (i *class-number*) > (let* ((file-namestring (%format nil "~A-~D.cls" > - (pathname-name output-file) > + (substitute #\_ #\. > (pathname-name output-file)) > (1+ i))) > (pathname (merge-pathnames file-namestring output-file))) > (when (probe-file pathname) I've committed this. It's certainly the right thing to do in the spirit of the current code. (The current code in that area could stand a bit of reorganization, but that's a separate issue.) Thanks! > It seems unrelated (ie., same problem with unpatched compile-file), > but I do get the following when building abcl with itself, at jar > time: > > 529.233 seconds real time > 79599260 cons cells > > # > # An unexpected error has been detected by HotSpot Virtual Machine: > # > # SIGBUS (0x7) at pc=0xb7844a62, pid=26061, tid=3086935744 > # > # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode) > # Problematic frame: > # C [libzip.so+0xfa62] > # > # An error report file with more information is saved as hs_err_pid26061.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # I've seen similar things once in a while since abcl started using the Java zip API. I think it's a Java bug; application code that passes the verifier shouldn't be able to crash the JVM. -Peter |