[Newbie]Unexpected signal from FFI on Solaris 8

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Thu, 8 May 2003 21:28:45 +0100


I found myself a solaris box and was able to reproduce your bug.

To try to track down what was happening, I modified the code generated by 
ffihugs and modified your test.c and Test.hs to check that the function 
'times' gave the same result.  Test.c and Test.hs both saw a return value of 
-1 (hence the segfault) but the modified version of test.c didn't print 
anything.  

Hypothesis: there is a standard library function on solaris called 'times' 
which is shadowing your definition of times.

To test this hypothesis, I renamed the C function being called to 'times_adr', 
recompiled, reloaded and... it worked just fine.

Does anyone know of a flag you can pass to a linker to make it report an error 
instead of silently doing the wrong thing?

--
Alastair Reid