[mercury-users] Segfaults and stack overflows?

Peter Hawkins peter at hawkins.emu.id.au
Mon Jun 7 20:11:21 AEST 2004


Hi...
On Mon, Jun 07, 2004 at 09:58:05AM +0100, David Overton wrote:
> On Mon, Jun 07, 2004 at 12:34:10PM +1000, Peter Hawkins wrote:
> > *** Mercury runtime: caught segmentation violation ***
> > PC at signal: 134655154 (806acb2)
> > address involved: 0x2
> 
> Looks like an attempt to dereference a (tagged) NULL pointer, rather
> than a stack overflow.  If you have any embedded C code in your program,
> that is most likely the culprit.

Right you are. --c-debug enabled me to find it within seconds (a failure
to check for an out of memory condition). Thanks for the tip.

Is there a sane way to throw a Mercury exception from C code? There's
nothing about this in the documentation as far as I can see (apart from
the statement in exception.m that exceptions can't travel across C
code).

=)
Peter
--------------------------------------------------------------------------
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