[CM] fun with CM + Linux
Christophe Rhodes
csr21@cam.ac.uk
Mon, 9 Dec 2002 13:10:32 +0000
On Mon, Dec 09, 2002 at 08:00:39AM -0500, Dave Phillips wrote:
> Bill Schottstaedt wrote:
>
> > It might be significant that the segfault happens at:
> >
> > #.(SYSTEM:INT-SAP #x3FFFEAE0))
> >
> > This is in CMUCL, and is called only in ffi.lisp when I'm trying to
> > pass an array from Lisp to C (or vice versa?). But that doesn't happen
> > at all in start-snd! In the best of all worlds, you'd be able to run
> > cmucl under gdb, fall into gdb upon the segfault, then look at the
> > stack and locals to see what has gone awry (there's an example in
> > clm.html), but that trick rarely works in cmucl -- you'll just see a
> > bunch of question marks or completely bogus entries.
>
> Hi Bill:
>
> I tried a suggestion from Rick that works perfectly, and I think it
> might narrow down the problem source.
>
> I did the following:
>
> 1. I commented out the 'save'cm' lines from cm.lisp as per Rick's
> advice.
I haven't been following terribly closely, but are you linking foreign
(i.e. "C") code and saving in a core? Until very recently (after the
most recent official CMUCL release) this caused segmentation faults, as
the foreign references weren't saved (and so weren't loaded at startup).
Until now, the workaround has been to do as you did -- to load from fasl
files rather than from core; however, recently the cmucl team added the
functionality needed to make this work.
Sorry if this is barking up the wrong tree, but let me know if there's
more information I can provide.
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)