On 5-Oct-09, at 9:02 PM, Michele Zaffalon wrote:
(load "bind")
"/home/michele/src/scheme/gambit/ffi/4/bind.o1"
(f (lambda (x) (expt 2 x)))
I get a segmentation fault
bt full is provided.
System is OpenBSD 4.5 (GENERIC) #1749: Sat Feb 28 14:51:18 MST 2009 deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Mobile Intel(R) Pentium(R) 4 CPU 2.30GHz ("GenuineIntel" 686-class) 2.16 GHz
It is quite probable that OpenBSD forbids executing code in the C heap, for security reasons I guess. Usually there is a way to tell the operating system that a certain range of addresses contains executable code. I have no clue what this is on OpenBSD. If you do find out or someone on the list knows, please let me know.
Marc