|
Typecheck hole in safety = 3, speed = 3 code: msg#00350lisp.cmucl.devel
The discussion about the memory corruption reminds me I never reported this problem I found. Under certain conditions, a setf on a struct accessor does not check for the type of the assignment even under maximum safety. (declaim (optimize (safety 3) (debug 3) (speed 0))) (defstruct foo (bar 0 :type fixnum)) (defun test (baz) (setf (foo-bar baz) "hello, world") baz) (print (foo-bar (test (make-foo)))) ;; you get a compilation warning, but not a runtime error: #| ; Compiling /home/cracauer/work/cvs-work/prg/test/lisp/safety/struct.lisp Fri, 2003-08-29 11:46:04-04:00 ; ; ; File: /home/cracauer/work/cvs-work/prg/test/lisp/safety/struct.lisp ; In: DEFUN TEST ; (SETF (FOO-BAR BAZ) "Hello, World") ; --> LET* MULTIPLE-VALUE-BIND LET FUNCALL C::%FUNCALL ; ==> ; #:G0 ; Warning: This is not a (VALUES &OPTIONAL FIXNUM &REST T): ; "Hello, World" ; ; Compilation unit finished. ; 1 warning ; Loading #p"/home/cracauer/work/cvs-work/prg/test/lisp/safety/struct.x86f". "Hello, World" NIL :user 439 K Yes, Master? |# |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Dynamic-extent ahead: 00350, Gerd Moellmann |
|---|---|
| Next by Date: | Re: Typecheck hole in safety = 3, speed = 3 code: 00350, Gerd Moellmann |
| Previous by Thread: | Old mail on gc leak?i: 00350, Raymond Toy |
| Next by Thread: | Re: Typecheck hole in safety = 3, speed = 3 code: 00350, Gerd Moellmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |