Rupert Swarbrick <rswarbrick at gmail.com> writes:
>> OK, here is an even smaller example which triggers the bug:
>> invert_by_lu (matrix ([v [0]]));
>>
>> The error is caused by a name collision: there is a special
>> variable LB in src/grind.lisp (left bracket for arrays)
>> and apparently the symbol LB in share/linearalgebra/lu.lisp
>> refers to that same variable and clobbers it.
>> Renaming LB in lu.lisp to FOO-LB avoids the error.
>> I would have expected LB in lu.lisp to be a lexical variable; why not?
>> best, Robert Dodier
>
> Grepping shows it declared special in src/fortra.lisp. I haven't looked
> further into why.
>
> Rupert
The attached patch fixes this problem. Indeed, grepping further showed
that there were name collisions in quite a few places (lb stands for
"left bracket", "limit B" and "lower bound" it seems).
Note that the patch updates share/numeric/cfortr.lisp to follow the new
names, but that file is not going to load on any modern lisp
implementation without some serious changes.
I would include a new testsuite test, but I don't think I can work out
how because grind() works by printing a string (and returns false!).
Comments?
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Rename-lb-and-rb-special-variables-in-src-grind.lisp.patch
Type: text/x-diff
Size: 12058 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120111/b09ae7fa/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120111/b09ae7fa/attachment-0001.pgp>