Stas Boukarev stass...@gmail.com writes:
Juan Jose Garcia-Ripoll juanjose.garciarip...@googlemail.com writes:
Hi everybody,
Regarding Stas Boukarev's problems with require-ing ASDF and compiling a
test file that defines the ASDF package, I could not reproduce it in any
system with a clean new copy of ECL.
This is quite unfortunate, because this really is a show-stopper here, I
can't load any .fas which weren't compiled in the current instance of
ECL.
Here is my further analyses:
Consider the function
ecl_make_package
http://ecls.git.sourceforge.net/git/gitweb.cgi?p=ecls/ecl;a=blob;f=src/c/package.d;h=5939239084d30db5d484ce3ff8924a3ee64ef004;hb=HEAD#l195
which is eventually called when loading the code I showed earlier.
It calls
x = find_pending_package(env, name, nicknames);
which returns a package, because it finds it in env-packages_to_be_created
(which, I
presume, is set up by LOAD), so that means that if (Null(x)) { ... } is
not executed, and the variable `other' isn't set to anything.
Next, it iterates over nicknames, which it has none, and `other' is still
untouched.
And finally, it does
if (!Null(other))
but the variable `other' wasn't ever initialized, and when I insert a print
statement there, it shows #illegal pointer bf9c2d38, which isn't null,
and it's eventually passed to CEpackage_error, which then
complains not a lisp data object.
And the patch which fixes the problem for me.
diff --git a/src/c/package.d b/src/c/package.d
index 5939239..88d5957 100644
--- a/src/c/package.d
+++ b/src/c/package.d
@@ -195,7 +195,7 @@ cl_object
ecl_make_package(cl_object name, cl_object nicknames, cl_object use_list)
{
const cl_env_ptr env = ecl_process_env();
- cl_object x, l, other;
+ cl_object x, l, other = Cnil;
/* Type checking, coercions, and the like, happen before we
* acquire the lock */
--
With Best Regards, Stas.
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list