[Ecls-list] Bug report: Byte compilation and setf functions...
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sun Nov 29 17:19:39 UTC 2009
On Sat, Nov 28, 2009 at 6:47 PM, Pascal Costanza <pc at p-cos.net> wrote:
>> (setf (fdefinition '(setf foo))
> (coerce '(lambda (new-value x) (+ new-value x)) 'function))
>> (defun test ()
> (setf (foo 5) 6))
>> (compile 'test)
>> (test)
>
> Detected access to an invalid or protected memory address.
>
> If I use eval instead of coerce when assigning to (fdefinition '(setf foo)), this works...
;;; Date: 29/11/2009 (P. Constanza)
;;; Fixed: 29/11/2009 (Juanjo)
;;; Description:
;;; When calling a bytecodes (SETF ...) function from a compiled function
;;; an invalid memory access is produced. This is actually a consequence
;;; of a mismatch between the position of the fields bytecodes.entry
;;; and cfun.entry
Fixed in CVS. I added a test to ensure this does not happen again when
manipulating the object.h header
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