On Fri, Aug 10, 2007 at 01:09:42PM +1000, Roman Leshchinskiy wrote:
> >=====> derefnull(normal)
> >cd . && '/Users/chak/Code/ghc-test/compiler/stage1/ghc-inplace' 
> >-no-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin  -o derefnull 
> >derefnull.hs    >derefnull.comp.stderr 2>&1
> >cd . && ./derefnull    </dev/null >derefnull.run.stdout 
> >2>derefnull.run.stderr
> >Wrong exit code (expected 139 , actual 138 )
> 
> Just FYI, 139 is SIGSEGV and 138 is SIGBUS. The latter is what 
> dereferencing a NULL pointer generates on MacOS. If I add
> 
>   exit_code_if_platform(138, 'i386-apple-darwin')

I've added this, thanks!

> the test still fails because when run with ghci, the exit code is 1. I 
> don't know if that's correct.

It sounds suspicious to me.

> In general, I think the signal will be 
> highly platform-dependent and we shouldn't expect a particular exit code 
> here.

I think there are sufficiently few platforms that it shouldn't be much
of a problem to give the appropriate exit code for them all. We should
probably make the *if_platform helpers take a regexp rather than a
string, though.


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to