[Ecls-list] Two bugs in ECL's CLOS implementation

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri Nov 27 21:42:12 UTC 2009


On Wed, Nov 25, 2009 at 10:28 PM, Pascal Costanza <pc at p-cos.net> wrote:
> Currently working on support for Closer to MOP, one minor nit,
> one that appears to be a showstopper at the moment.
> [...]
> If I compile this, I get a warning that I pass too many arguments to make-instance.

The optimizer for slot accessor was trying to optimize (improperly, of
course), make-instance. It emitted a spurious warning before noticing
that make-instance is not a slot accessor

> Showstopper:
> [...]
>> (clos:set-funcallable-instance-function #'test (lambda (a b c) (* a b c)))
>[...]
>> (defmethod test (a b c) (+ a b c))
> Detected access to an invalid or protected memory address.

CLOS:SET-FUNCALLABLE-INSTANCE-FUNCTION has to change the structure of
the generic function to store the dispatch function somewhere.
Unfortunately I forgot to copy a field, instance.sig,  which is used
to determine when instances become obsolete and when they have been
initialized.

Both are fixed in CVS. Thanks a lot for reporting and taking the time
to write small test cases!

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list