[plt-scheme] Re: A segmentation fault on OS X Intel

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jan 13 14:06:51 EST 2008

After turning on 8-byte alignment for allocation via 

 #define ALIGN_DOUBLE

in "newgc.c", then I'm not able to generate a crash.

While 8-byte alignment isn't normally required for `double' arrays on
x86 or Mac OS, maybe it's required for BLAS routines?

Matthew

At Sun, 13 Jan 2008 14:58:26 +0000, "Noel Welsh" wrote:
> Adding a display line such as below is enough to stop a segmentation
> fault.  Also I see a segfault most of the time, but not all of the
> time.  I'm now wondering if switching between the standard FP pipeline
> and the SIMD one has some implications that aren't accounted for in
> the FFI?
> 
> 
> > (module dgemv-test mzscheme
> >
> >   ;; Causes segmentation fault with this line
> >   (require
> >    (planet "srfi-4-comprehensions.ss" ("wmfarr" "srfi-4-comprehensions.plt" 
> 1))
> >    (planet "all.ss" ("wmfarr" "plt-linalg.plt" 1)))
> >
>      (display 'foo) ;; this stops the seg fault
> >
> >   (display
> >    (f64vector-matrix-mul
> >     (f64vector 1. 0. 0. 0. 0. 0. 0. 0. 0. 0.)
> >     (matrix 10 10   0 0 0 0 0 0 0 0 0 1
> >                     1 0 0 0 0 0 0 0 0 0
> >                     0 1 0 0 0 0 0 0 0 0
> >                     0 0 1 0 0 0 0 0 0 0
> >                     0 0 0 1 0 0 0 0 0 0
> >                     0 0 0 0 1 0 0 0 0 0
> >                     0 0 0 0 0 1 0 0 0 0
> >                     0 0 0 0 0 0 1 0 0 0
> >                     0 0 0 0 0 0 0 1 0 0
> >                     0 0 0 0 0 0 0 0 1 0)))
> >
> >   )
> >
> > More diagnosis to follow later.  This is weird weird weird!
> >
> > N.
> >
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.