[mercury-users] Re: Mercury program loops for ever with rotd-2003-02-23
Julien Fischer
juliensf at cs.mu.OZ.AU
Tue Mar 8 17:20:52 AEDT 2005
On Tue, 8 Mar 2005, Michael Day wrote:
>
> Hi,
>
> > The following construct causes a program compiled with rotd-2003-02-23 to
> > loop for ever until it segfaults:
>
> Correction: the program does not loop for ever, but actually crashes in an
> unrelated function in another module which appears to be passed a NULL
> pointer for some reason.
>
> Again, the problem disappears if the call to my_function is hoisted out of
> the if statement.
>
> Trying to track down where the NULL pointer is coming from is a bit
> difficult in the asm_fast.gc grade, as there is no decent stack trace in
> gdb. Any tips?
>
Build the program and possibly the standard library with C level debugging
enabled (it's already enabled for the runtime). You can do that by
compiling with `--c-debug'. You should get decent stack traces from gdb
then.
I'd suggest first trying it with a more recent rotd as the version of
Mercury that you're using is over two years old now.
Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list