Custom Query (1030 matches)
Results (724 - 726 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1312 | fixed | Compiler bug x862-form to freg #<ACODE nil NIL> | ||
| Description |
./lx86cl (load "home:quicklisp;setup") (ql:quickload :manardb) (in-package :manardb) (defun junk () (lisp-object-to-mptr nil)) > Error: Compiler bug or inconsistency: > x862-form to freg #<ACODE nil NIL> |
|||
| #1317 | fixed | LOAD-TIME-VALUE constantness issue | ||
| Description |
The following code works fine in ccl-1.9: (in-package :cl-user)
(defun abc ()
(let* ((body
'(let ((cache (load-time-value (cons (cons nil nil) nil))))
(let ((fn #'(lambda () t)))
(setf (car cache) (cons fn t))
(values (funcall (caar cache))))))
(thunk (compile nil `(lambda () ,body))))
(disassemble thunk)
(funcall thunk)))
(print (abc))
but fails with "Error of type CCL::INVALID-MEMORY-ACCESS: Fault during read of memory address #x0" error on (funcall (caar cache)) form in trunk and ccl-1.10. The code was distilled from a piece of code utilizing LOAD-TIME-VALUE cache pattern as in http://random-state.net/log/3507100003.html (I used it in a compiler macro) The problem can be currently worked around by commenting out (multiple-value-bind ...) form in (def-acode-rewrite acode-rewrite-cxr ...) in compiler/acode-rewrite.lisp: http://trac.clozure.com/ccl/browser/trunk/source/compiler/acode-rewrite.lisp?rev=16571#L567 Disassembly output before applying the workaround. Looks like the compiler treats (load-time-value (cons (cons nil nil) nil)) as a read-only constant value that cannot be changed: (recover-fn-from-rip) ; [7]
(testl (% nargs) (% nargs)) ; [14]
(jne L149) ; [16]
(pushq (% rbp)) ; [22]
(movq (% rsp) (% rbp)) ; [23]
(movq (@ '#<Anonymous Function #x302000B53A9F> (% fn)) (% arg_z)) ; [26]
(pushq (% arg_z)) ; [33]
(movq (@ '((NIL)) (% fn)) (% arg_y)) ; [34]
(pushq (% arg_y)) ; [41]
(movq (@ -8 (% rbp)) (% arg_y)) ; [42]
(movl ($ #x1302E) (% arg_z.l)) ; [46]
(subq ($ 13) (@ (% gs) #xD8)) ; [51]
(movq (@ (% gs) #xD8) (% temp0)) ; [61]
(cmpq (@ (% gs) #xE0) (% temp0)) ; [70]
(ja L76) ; [79]
(uuo-alloc) ; [81]
L76
(andb ($ #xF0) (@ (% gs) #xD8)) ; [83]
(movq (% arg_y) (@ 5 (% temp0))) ; [92]
(movq (% arg_z) (@ -3 (% temp0))) ; [96]
(movq (% temp0) (% arg_z)) ; [100]
(popq (% arg_y)) ; [103]
(lisp-call (@ .SPRPLACA)) ; [109]
(recover-fn-from-rip) ; [116]
(xorl (% nargs) (% nargs)) ; [123]
(movq (@ 'NIL (% fn)) (% temp0)) ; [125]
(lisp-call (@ 10 (% temp0))) ; [137]
(recover-fn-from-rip) ; [140]
(leaveq) ; [147]
(retq) ; [148]
L149
(uuo-error-wrong-number-of-args)
Disassembly output after applying the workaround: (recover-fn-from-rip) ; [7]
(testl (% nargs) (% nargs)) ; [14]
(jne L193) ; [16]
(pushq (% rbp)) ; [22]
(movq (% rsp) (% rbp)) ; [23]
(movq (@ '#<Anonymous Function #x302000B0A71F> (% fn)) (% arg_z)) ; [26]
(pushq (% arg_z)) ; [33]
(movq (@ '((NIL)) (% fn)) (% arg_y)) ; [34]
(pushq (% arg_y)) ; [41]
(movq (@ -8 (% rbp)) (% arg_y)) ; [42]
(movl ($ #x1302E) (% arg_z.l)) ; [46]
(subq ($ 13) (@ (% gs) #xD8)) ; [51]
(movq (@ (% gs) #xD8) (% temp0)) ; [61]
(cmpq (@ (% gs) #xE0) (% temp0)) ; [70]
(ja L76) ; [79]
(uuo-alloc) ; [81]
L76
(andb ($ #xF0) (@ (% gs) #xD8)) ; [83]
(movq (% arg_y) (@ 5 (% temp0))) ; [92]
(movq (% arg_z) (@ -3 (% temp0))) ; [96]
(movq (% temp0) (% arg_z)) ; [100]
(popq (% arg_y)) ; [103]
(lisp-call (@ .SPRPLACA)) ; [109]
(recover-fn-from-rip) ; [116]
(movq (@ '((NIL)) (% fn)) (% arg_z)) ; [123]
(movq (@ 5 (% arg_z)) (% arg_z)) ; [130]
(movl (% arg_z.l) (% imm0.l)) ; [134]
(andl ($ 7) (% imm0.l)) ; [136]
(cmpl ($ 3) (% imm0.l)) ; [139]
(jne L201) ; [142]
(movq (@ 5 (% arg_z)) (% arg_z)) ; [144]
(pushq (% arg_z)) ; [148]
(movq (@ -16 (% rbp)) (% temp0)) ; [149]
(xorl (% nargs) (% nargs)) ; [153]
(movl (% temp0.l) (% imm0.l)) ; [155]
(andl ($ 15) (% imm0.l)) ; [157]
(cmpl ($ 14) (% imm0.l)) ; [160]
(cmovgq (% temp0) (% temp1)) ; [163]
(jl L209) ; [167]
(cmoveq (@ 10 (% temp0)) (% temp1)) ; [169]
(lisp-call (% temp1)) ; [177]
(recover-fn-from-rip) ; [180]
(addq ($ 8) (% rsp)) ; [187]
(leaveq) ; [191]
(retq) ; [192]
L193
(uuo-error-wrong-number-of-args) ; [200]
L201
(uuo-error-reg-not-list (% arg_z)) ; [208]
L209
(uuo-error-not-callable) ; [216]
|
|||
| #1318 | fixed | (require 'cocoa) doesn't work with lisp built on OS X 10.11 | ||
| Description |
After doing (rebuild-ccl :full t) on an OS X 10.11 system, (require 'cocoa) will fail by crashing into the lisp kernel debugger. A slightly simpler test case is (require 'objc-support), but that doesn't fully exercise things. As I mentioned earlier today, I believe that this is (at least in part) because Objective-C isa pointers are not necessarily pointers any more. Starting the lisp with the environment variable OBJC_DISABLE_NONPOINTER_ISA set to YES will enable the (require 'cocoa) to succeed. $ env OBJC_DISABLE_NONPOINTER_ISA=YES ccl (I found this out on http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_explain_Non-pointer_isa.html) |
|||
