[armedbear-devel] Unqualified FIND-PACKAGE call in ABCL compiled files

Erik Huelsmann ehuels at gmail.com
Mon Aug 6 07:49:16 UTC 2012


Hi Vladimir,

Thanks for the report! I've committed the fix to trunk, which means it's up
for inclusion in 1.1.0 which is due later this year.

Bye,

Erik.

On Mon, Aug 6, 2012 at 4:02 AM, Vladimir Sedach <vsedach at gmail.com> wrote:

> Hi,
>
> Currently, ABCL doesn't qualify the package of FIND-PACKAGE when it
> serializes a package in a compiled file. This causes a bug when
> loading a compiled file that has code (for example, the EOS:TEST macro
> from the EOS unit-testing library) that serializes a package, and
> occurs after an IN-PACKAGE into a package that either shadows or does
> not import FIND-PACKAGE from COMMON-LISP.
>
> I didn't work out a minimum test case, but the problem can be observed
> when trying to load the Parenscript test suite:
> (ql:quickload :parenscript.test)
>
> Here's the fix:
>
> Index: src/org/armedbear/lisp/compiler-pass2.lisp
> ===================================================================
> --- src/org/armedbear/lisp/compiler-pass2.lisp  (revision 14055)
> +++ src/org/armedbear/lisp/compiler-pass2.lisp  (working copy)
> @@ -1191,7 +1191,7 @@
>
>  (defun serialize-package (pkg)
>    "Generate code to restore a serialized package."
> -  (emit 'ldc (pool-string (concatenate 'string "#.(FIND-PACKAGE \""
> +  (emit 'ldc (pool-string (concatenate 'string "#.(CL:FIND-PACKAGE \""
>                                         (package-name pkg) "\")")))
>    (emit-invokestatic +lisp+ "readObjectFromString"
>                       (list +java-string+) +lisp-object+))
> Index: src/org/armedbear/lisp/Package.java
> ===================================================================
> --- src/org/armedbear/lisp/Package.java (revision 14055)
> +++ src/org/armedbear/lisp/Package.java (working copy)
> @@ -865,7 +865,7 @@
>      public String printObject()
>      {
>          if (_PRINT_FASL_.symbolValue() != NIL && name != null) {
> -            StringBuilder sb = new StringBuilder("#.(FIND-PACKAGE \"");
> +            StringBuilder sb = new StringBuilder("#.(CL:FIND-PACKAGE \"");
>              sb.append(name);
>              sb.append("\")");
>              return sb.toString();
>
> Happy hacking,
> Vladimir
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20120806/2014d1ad/attachment.html>


More information about the armedbear-devel mailing list