Re: [Ecls-list] Release ready

2011-01-16 Thread Stas Boukarev
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


Re: [Ecls-list] Release ready

2011-01-16 Thread Juan Jose Garcia-Ripoll
Thanks for identifying the problem. It seems that the uninitialized variable
was only detected by gcc 4.5, while all other compilers I used (4.4. 4.0,
3.something) ignored that. I already uploaded the fix.

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
--
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


Re: [Ecls-list] Release ready

2011-01-16 Thread Matthew Mondor
On Sun, 16 Jan 2011 19:16:23 +0100
Juan Jose Garcia-Ripoll juanjose.garciarip...@googlemail.com wrote:

 The patch for etags and the fix for the Makefile were committed today. Some
 changes were needed to make it work on other makes

I confirm these fixed it for me.

Thanks!
-- 
Matt

--
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