[mercury-users] Mercury runtime problem on Windows

Paul Bone pbone at csse.unimelb.edu.au
Thu Aug 13 16:31:08 AEST 2009


On Thu, Aug 13, 2009 at 02:38:34PM +1000, Michael Day wrote:
> Hi Paul,
>
>> This should not happen, each process should have it's own set of handlers
>> independant of any other process.  I think this would be an implementation
>> problem in Windows.
>
> That would be annoying. Is there some way to workaround this in the  
> Mercury runtime? Perhaps try the call again if it fails?
>
> Alternatively, what happens if the segfault handler is not installed?
>
> Is it necessary for garbage collection, or only the detection of  
> catastrophic failures? From our perspective, this *is* a catastrophic  
> failure, so we would rather proceed without it than abort if possible.
>

AIUI this is for the detection and slightly-more-graceful handling of memory
access errors.  In some places in the runtime we use mprotect() to ensure that
reads or writes to that memory are caught as errors, I forget exactly what this
is for but perhaps to catch stack overruns, this may be related to our SIGSERV
handler.

That's a good point.  I'd recommend writing a C program that trys to install
signal handlers and spawning multiple copies of that program to see if this
problem occurs is independently of Mercury.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/users/attachments/20090813/1743afbf/attachment.sig>


More information about the users mailing list