[Mono-dev] [SIGNAL] Segfault in native function called by managed code

Eberhard Beilharz eb1 at sil.org
Mon Sep 7 06:34:32 UTC 2015


Making it configurable would seem like a good option to me. Currently if
the app gets a SEGFAULT it simply disappears for the user without
leaving a trace, so I as a developer can't easily see what happened on
the user's machine nor can I implement code that would give the user a
chance to report what happened.

If it would be configurable then we could catch the exception, let the
user send in an error report, and then try to reproduce it, possibly
with the other configuration set so that we see the SEGFAULT.

Or am I missing something how the SEGFAULT could currently be handled in
a mono app?

Thanks
    Eberhard
 

Miguel De Icaza <miguel at xamarin.com> wrote on 2015-09-05 at 03:32 +0200:
> It is an implementation choice.
>
> Perhaps we could make this configurable, but more often than not, this
> indicates a serious issue, and surfacing something so useful as a
> AccessViolationException reduces the usefulness of the feature.
>
> On Fri, Sep 4, 2015 at 6:15 AM, Raphael Boissel
> <raphael.boissel at gmail.com <mailto:raphael.boissel at gmail.com>> wrote:
>
>     Hello,
>
>
>     I have one little question on the way mono currently handles/uses the
>     SEGFAULT signal on Unix OSes.
>
>     Currently, and correct me if I'm wrong, either the segfault has been
>     raised by a managed function and in this case it is handled as a
>     genuine exception for instance a nullRefException or if it is
>     triggered
>     by native code the entire program is stopped and a stacktrace is
>     displayed.
>
>     However it seems that mono also follow the second behavior for
>     native code that has been invoked inside managed code,
>     where I would have expected an AccessViolationException.
>
>     Is there any specific reasons why this behavior is followed, or is it
>     just an implementation choice ?
>
>     (sorry about the potential double post I sent it first with a
>     non-whitelisted
>     e-mail address)
>
>     Thanks,
>
>     -- 
>     Raphaël 'Shugo' Boissel
>
>     _______________________________________________
>     Mono-devel-list mailing list
>     Mono-devel-list at lists.ximian.com
>     <mailto:Mono-devel-list at lists.ximian.com>
>     http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150907/6b301f7c/attachment.html>


More information about the Mono-devel-list mailing list