[Openmcl-devel] Fault during read of memory address

Taylor, Joshua jtaylor at alum.rpi.edu
Thu Dec 6 06:54:57 PST 2007


On Dec 5, 2007 8:57 PM, Gary Byers <gb at clozure.com> wrote:
> This is the same bug reported in
>
> <http://www.clozure.com/pipermail/bug-openmcl/2007-November/000519.html>
>
> It was fixed in the change described in
>
> <http://trac.clozure.com/openmcl/changeset/7615>
>
>
> <http://trac.clozure.com/openmcl/wiki/UpdatingFromSource> explains how
> to update from CVS (to apply bug fixes and other changes.)
>
> This bug was never entered as a Trac "ticket"; had it been, you might
> have been able to find this information more easily.
>

Thanks for the quick reply! I updated from source (I was /very/
pleased at how painless it was. I can't remember the last time
updating something from source was quite so smooth.) and rebuilt and
that took care of that bug.

I've still got another bug though, illustrated by the following
code/backtrace. In it, I've got a length 80 array with random values,
and a function that reads a value from the array. When the index is in
a lexical variable, I can't compile the file. When the index is
constant number in the text, the file can be compiled. The machine/OS
is the same as before: iBook G4, OS X 10.4.10, and I updated from
source and rebuilt so that:
? (lisp-implementation-type) => "OpenMCL"
? (lisp-implementation-version) => "Version 1.1-r7829 (DarwinPPC32)"

(Now that I know about bug-openmcl too, I searched there and on trac,
but nothing popped out at me. Maybe it's something someone else has
seen before, though.)

Thanks in advance!

^_^ tayloj at hobbang:~$ cat foo.lisp
(defconstant *matrix*
  (let ((matrix (make-array '(80) :element-type 'fixnum)))
    (dotimes (i 80 matrix)
      (setf (aref matrix i) (random 1000)))))

(defun problem81 ()
  (let ((j 50))
    ;;(aref *matrix* 50) ; no problem
    (aref *matrix* j)   ; bad
    ))
^_^ tayloj at hobbang:~$ openmcl
Welcome to OpenMCL Version 1.1-r7829 (DarwinPPC32)!
? (compile-file "foo.lisp")
> Error: Fault during read of memory address #x10
> While executing: CCL::FASL-DUMP-LIST, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1> :b :show-frame-contents t
(F0199AA0) : 0 (FASL-DUMP-LIST #<BOGUS object @ #xD>) 76
  (LIST)
   LIST: #<BOGUS object @ #xD>



(F0199AA0) : 1 (FASL-DUMP-GVECTOR #(13 46 81 669 48 ...) 55) 124
  (CCL::V CCL::OP)
   CCL::V: #(13 46 81 669 48 ...)
   CCL::OP: 55

  CCL::N: 80
  CCL::I: #<BOGUS object @ #xD>

(F0199AB0) : 2 (FASL-DUMP-FUNCTION #<Compiled-function PROBLEM81
(Non-Global)  #x854199E>) 380
  (CCL::F)
   CCL::F: #<Compiled-function PROBLEM81 (Non-Global)  #x854199E>

  CCL::N: 5
  CCL::I: 1

(F0199AC0) : 3 (FASL-DUMP NIL NIL '(# # # #) #<HASH-TABLE :TEST EQ
size 4/30 #x85415A6>) 268
  (CCL::GNAMES CCL::GOFFSETS CCL::FORMS CCL::HASH)
   CCL::GNAMES: NIL
   CCL::GOFFSETS: NIL
   CCL::FORMS: ((23 3) (47 "foo.lisp") (4 #) (35 # NIL))
   CCL::HASH: #<HASH-TABLE :TEST EQ size 4/30 #x85415A6>

  CCL::*FASDUMP-HASH*: #<HASH-TABLE :TEST EQ size 4/30 #x85415A6>
  CCL::*FASDUMP-READ-PACKAGE*: NIL
  CCL::*FASDUMP-EPUSH*: NIL
  CCL::*FASDUMP-EREF*: 3
  CCL::*FASDUMP-GLOBAL-OFFSETS*: NIL
  #:G23991: NIL
  CCL::OP: (35 #<Compiled-function PROBLEM81 (Non-Global)  #x854199E> NIL)
  #:G23994: (NIL)
  CCL::ARG: #<Compiled-function PROBLEM81 (Non-Global)  #x854199E>

(F0199AD0) : 4 (FASL-DUMP-BLOCK NIL NIL '(# # # #) #<HASH-TABLE :TEST
EQ size 4/30 #x85415A6>) 244
  (CCL::GNAMES CCL::GOFFSETS CCL::FORMS CCL::HASH)
   CCL::GNAMES: NIL
   CCL::GOFFSETS: NIL
   CCL::FORMS: ((23 3) (47 "foo.lisp") (4 #) (35 # NIL))
   CCL::HASH: #<HASH-TABLE :TEST EQ size 4/30 #x85415A6>

  CCL::ETAB-SIZE: 4

(F0199AE0) : 5 (FASL-DUMP-FILE NIL NIL '(# # # #) #<HASH-TABLE :TEST
EQ size 4/30 #x85415A6> "foo.dfsl") 472
  (CCL::GNAMES CCL::GOFFSETS CCL::FORMS CCL::HASH CCL::FILENAME)
   CCL::GNAMES: NIL
   CCL::GOFFSETS: NIL
   CCL::FORMS: ((23 3) (47 "foo.lisp") (4 #) (35 # NIL))
   CCL::HASH: #<HASH-TABLE :TEST EQ size 4/30 #x85415A6>
   CCL::FILENAME: "foo.dfsl"

  CCL::OPENED?: T
  CCL::FINISHED?: NIL
  #:G23987: #<BASIC-FILE-BINARY-OUTPUT-STREAM ("foo.dfsl"/4
ISO-8859-1) #x85406DE>
  #:G23988: NIL
  CCL::*FASDUMP-STREAM*: #<BASIC-FILE-BINARY-OUTPUT-STREAM
("foo.dfsl"/4 ISO-8859-1) #x85406DE>

(F0199B20) : 7 (FASL-SCAN-FORMS-AND-DUMP-FILE '(# # # #) "foo.dfsl" [...]) 212
  (CCL::FORMS CCL::OUTPUT-FILE &OPTIONAL CCL::ENV)
   CCL::FORMS: ((23 3) (47 "foo.lisp") (4 #) (35 # NIL))
   CCL::OUTPUT-FILE: "foo.dfsl"
   CCL::ENV: #<CCL::LEXICAL-ENVIRONMENT #x854D656>

  CCL::*FCOMP-LOCKED-HASH-TABLES*: NIL
  CCL::*FCOMP-LOAD-FORMS-ENVIRONMENT*: #<CCL::LEXICAL-ENVIRONMENT #x854D656>
  CCL::HASH: #<HASH-TABLE :TEST EQ size 4/30 #x85415A6>
  CCL::GNAMES: NIL
  CCL::GOFFSETS: NIL

(F0199B40) : 8 (%COMPILE-FILE "/Users/tayloj/foo.lisp" "foo.dfsl" NIL
NIL NIL NIL T T NIL NIL #<BACKEND DARWINPPC32 #x82E2A0E> :DEFAULT)
1484
  (CCL::SRC CCL::OUTPUT-FILE CCL::VERBOSE PRINT LOAD CCL::FEATURES
CCL::SAVE-LOCAL-SYMBOLS CCL::SAVE-DOC-STRINGS CCL::SAVE-DEFINITIONS
CCL::FORCE CCL::TARGET-BACKEND EXTERNAL-FORMAT)
   CCL::SRC: "/Users/tayloj/foo.lisp"
   CCL::OUTPUT-FILE: "foo.dfsl"
   CCL::VERBOSE: NIL
   PRINT: NIL
   LOAD: NIL
   CCL::FEATURES: NIL
   CCL::SAVE-LOCAL-SYMBOLS: T
   CCL::SAVE-DOC-STRINGS: T
   CCL::SAVE-DEFINITIONS: NIL
   CCL::FORCE: NIL
   CCL::TARGET-BACKEND: #<BACKEND DARWINPPC32 #x82E2A0E>
   EXTERNAL-FORMAT: :DEFAULT

  CCL::ORIG-SRC: #P"foo.lisp"
  CCL::OUTPUT-DEFAULT-TYPE: #P".dfsl"
  CCL::*FASL-NON-STYLE-WARNINGS-SIGNALLED-P*: NIL
  CCL::*FASL-WARNINGS-SIGNALLED-P*: NIL
  *FEATURES*: (:PRIMARY-CLASSES :COMMON-LISP :OPENMCL :CLOZURE
:CLOZURE-COMMON-LISP ...)
  CCL::*FASL-DEFERRED-WARNINGS*: NIL
  *FASL-SAVE-LOCAL-SYMBOLS*: T
  *FASL-SAVE-DOC-STRINGS*: T
  *FASL-SAVE-DEFINITIONS*: NIL
  CCL::*FCOMP-WARNINGS-HEADER*: NIL
  *COMPILE-FILE-PATHNAME*: #P"foo.lisp"
  *COMPILE-FILE-TRUENAME*: #P"/Users/tayloj/foo.lisp"
  *PACKAGE*: #<Package "COMMON-LISP-USER">
  *READTABLE*: #<READTABLE #x81C5E0E>
  *COMPILE-PRINT*: NIL
  *COMPILE-VERBOSE*: NIL
  CCL::*FASL-TARGET*: :DARWINPPC32
  CCL::*FASL-BACKEND*: #<BACKEND DARWINPPC32 #x82E2A0E>
  CCL::*FASL-TARGET-BIG-ENDIAN*: T
  CCL::*TARGET-FTD*: #S(CCL::FOREIGN-TYPE-DATA :TRANSLATORS
#<HASH-TABLE :TEST EQ size 16/60 #x840F9F6> :KIND-INFO #<HASH-TABLE
:TEST EQ size 30/60 #x840F716> ...)
  CCL::DEFENV: #<CCL::DEFINITION-ENVIRONMENT #x854D67E>
  CCL::LEXENV: #<CCL::LEXICAL-ENVIRONMENT #x854D656>
  CCL::*FCOMP-EXTERNAL-FORMAT*: :DEFAULT
  CCL::FORMS: ((23 3) (47 "foo.lisp") (4 #) (35 # NIL))

(F0199B60) : 10 (COMPILE-FILE "foo.lisp" [...]) 756
  (CCL::SRC &KEY :OUTPUT-FILE :VERBOSE :PRINT :LOAD :FEATURES :TARGET
:SAVE-LOCAL-SYMBOLS :SAVE-DOC-STRINGS :SAVE-DEFINITIONS
:EXTERNAL-FORMAT :FORCE)
   CCL::SRC: "foo.lisp"
   CCL::OUTPUT-FILE: NIL
   CCL::VERBOSE: NIL
   PRINT: NIL
   LOAD: NIL
   CCL::FEATURES: NIL
   CCL::TARGET: :DARWINPPC32
   CCL::TARGET-P: NIL
   CCL::SAVE-LOCAL-SYMBOLS: T
   CCL::SAVE-DOC-STRINGS: T
   CCL::SAVE-DEFINITIONS: NIL
   EXTERNAL-FORMAT: :DEFAULT

  CCL::FORCE: NIL
  CCL::BACKEND: #<BACKEND DARWINPPC32 #x82E2A0E>
  #:SKIP-COMPILE-FILE: #<RESTART CCL::SKIP-COMPILE-FILE #x76AAAE>
  #:RETRY-COMPILE-FILE: #<RESTART CCL::RETRY-COMPILE-FILE #x76AA86>
  #:G23803: (#<RESTART CCL::RETRY-COMPILE-FILE #x76AA86> #<RESTART
CCL::SKIP-COMPILE-FILE #x76AAAE>)
  CCL::%RESTARTS%: ((#<# # #x76AA86> #<# # #x76AAAE>) (#<# # #x76AC2E>
#<# # #x76AC56>) (#<# # #x76AD8E> #<# # #x76ADB6>))

(F0199B90) : 12 (CALL-CHECK-REGS 'COMPILE-FILE [...]) 72
  (CCL::FN &REST CCL::ARGS)
   CCL::FN: COMPILE-FILE
   CCL::ARGS: ("foo.lisp")

  CCL::OLD-REGS: (*PACKAGE* #<SYNONYM-STREAM to *TERMINAL-IO*
#x853BE26> (NIL) ("Version 1.1-r7829 (DarwinPPC32)") 0 ...)

(F0199BB0) : 14 (TOPLEVEL-EVAL '(COMPILE-FILE "foo.lisp") [...]) 152
  (CCL::FORM &OPTIONAL *LOADING-FILE-SOURCE-FILE*)
   CCL::FORM: (COMPILE-FILE "foo.lisp")
   *LOADING-FILE-SOURCE-FILE*: NIL

  PACKAGE: #<Package "COMMON-LISP-USER">

(F0199BC0) : 15 (READ-LOOP [...]) 888
  (&KEY :INPUT-STREAM :OUTPUT-STREAM :BREAK-LEVEL :PROMPT-FUNCTION)
   INPUT-STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #x853BE26>
   OUTPUT-STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #x853BC2E>
   CCL::BREAK-LEVEL: 0
   CCL::PROMPT-FUNCTION: #<Anonymous Function #x81DE41E>

  CCL::*BREAK-LEVEL*: 0
  CCL::*LAST-BREAK-LEVEL*: 0
  *LOADING-FILE-SOURCE-FILE*: NIL
  CCL::*IN-READ-LOOP*: NIL
  ***: NIL
  **: "OpenMCL"
  *: "Version 1.1-r7829 (DarwinPPC32)"
  +++: NIL
  ++: (LISP-IMPLEMENTATION-TYPE)
  +: (LISP-IMPLEMENTATION-VERSION)
  ///: NIL
  //: ("OpenMCL")
  /: ("Version 1.1-r7829 (DarwinPPC32)")
  -: (COMPILE-FILE "foo.lisp")
  CCL::EOF-VALUE: (NIL)
  #:ABORT-BREAK: #<RESTART ABORT-BREAK #x76AC56>
  #:ABORT: #<RESTART ABORT #x76AC2E>
  #:G28434: (#<RESTART ABORT #x76AC2E> #<RESTART ABORT-BREAK #x76AC56>)
  CCL::%RESTARTS%: ((#<# # #x76AC2E> #<# # #x76AC56>) (#<# # #x76AD8E>
#<# # #x76ADB6>))
  CCL::FORM: (COMPILE-FILE "foo.lisp")
  CCL::PATH: NIL
  CCL::PRINT-RESULT: T

(F0199C00) : 16 (TOPLEVEL-LOOP) 72
  NIL



(F0199C20) : 17 (FUNCALL #'#<Anonymous Function #x817447E>) 68
  NIL

  CCL::INIT-FILE: "home:openmcl-init"

(F0199C40) : 19 (FUNCALL #'#<Anonymous Function #x8219FDE>) 336
  NIL

  CCL::CLOSE-STREAMS: NIL
  CCL::CLEANUP-FUNCTION: #<COMPILED-LEXICAL-CLOSURE #x853BAAE>
  CCL::INITIAL-FUNCTION: #<COMPILED-LEXICAL-CLOSURE #x853BA96>
  OUTPUT-STREAM: #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (TTY/1) #x853C9CE>
  INPUT-STREAM: #<BASIC-CHARACTER-INPUT-STREAM ISO-8859-1 (TTY/0) #x853CF7E>
  *TERMINAL-IO*: #<ECHOING-TWO-WAY-STREAM input
#<BASIC-CHARACTER-INPUT-STREAM ISO-8859-1 (TTY/0) #x853CF7E>, output
#<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (TTY/1) #x853C9CE>
#x854FDCE>

(F0199C70) : 21 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1)
[Active] #x853B6DE> '(#)) 404
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #x853B6DE>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE #x853B326>)

  CCL::EXITED: NIL
  #:G28742: (PROCESS-RESET)
  CCL::%HANDLERS%: ((PROCESS-RESET))
  #:ABORT: #<RESTART ABORT #x76ADB6>
  #:ABORT-BREAK: #<RESTART ABORT-BREAK #x76AD8E>
  #:G28743: (#<RESTART ABORT-BREAK #x76AD8E> #<RESTART ABORT #x76ADB6>)
  CCL::%RESTARTS%: ((#<# # #x76AD8E> #<# # #x76ADB6>))

(F0199CB0) : 23 (FUNCALL #'#<Anonymous Function #x817ABAE>
#<TTY-LISTENER listener(1) [Active] #x853B6DE> '(#)) 152
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #x853B6DE>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE #x853B326>)

  *CURRENT-PROCESS*: #<TTY-LISTENER listener(1) [Active] #x853B6DE>
  CCL::SYMS: (CCL::*FREE-XPS* CCL::*FREE-CIRCULARITY-HASH-TABLES*
CCL::*FAKE-STACK-FRAMES* CCL::*VINSN-VARPARTS*
CCL::*VINSN-LABEL-FREELIST* ...)
  VALUES: (NIL NIL NIL #<POOL  #x854FFAE> #<POOL  #x854FF96> ...)

(F0199CD0) : 24 (FUNCALL #'#<Anonymous Function #x817236E>) 172
  NIL

  CCL::TCR: 787548
  CCL::THREAD: #<LISP-THREAD listener [tcr @ #x301170] #x853B9DE>
  CCL::*CURRENT-LISP-THREAD*: #<LISP-THREAD listener [tcr @ #x301170] #x853B9DE>
  CCL::INITIAL-FUNCTION: (#<Anonymous Function #x817ABAE>
#<TTY-LISTENER listener(1) [Active] #x853B6DE> (#))

1>


-- 
=====================
Joshua Taylor
jtaylor at alum.rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford



More information about the Openmcl-devel mailing list