Re: [Newbie]Unexpected signal from FFI on Solaris 8

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Organization Reid Consulting (UK) Ltd
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.