dereferencing null

"Jérôme M. Berger" jeberger at free.fr
Mon Mar 5 14:30:09 PST 2012


Steven Schveighoffer wrote:
> On Mon, 05 Mar 2012 13:29:09 -0500, deadalnix <deadalnix at gmail.com> wrote:
> 
>> Le 05/03/2012 15:26, Steven Schveighoffer a écrit :
>>> On Fri, 02 Mar 2012 10:19:13 -0500, deadalnix <deadalnix at gmail.com>
>>> wrote:
>>>
>>>> Le 02/03/2012 15:37, Jacob Carlborg a écrit :
>>>>> Isn't it quite unsafe to throw an exception in a signal ?
>>>
>>> One does not need to throw an exception. Just print a stack trace. I've
>>> advocated for this multiple times. I agree it costs nothing to
>>> implement, and who cares about safety when the app is about to crash?!
>>>
>>>> The signal handler is called on top of the stack, but the information
>>>> to retrieve the stack trace are system dependant. BTW, using lib like
>>>> libsigsegv can help a lot to make it safe. It isn't safe ATM, but it
>>>> is doable.
>>>
>>> libsigsegv is used to perform custom handling of page faults (e.g.
>>> loading pages of memory from a database instead of the MMC). You do not
>>> need libsigsegv to handle SEGV signals.
>>>
>>> -Steve
>>
>> No you don't, but if you want to know if you are facing a
>> stackoverflow or a null deference for exemple, this greatly help the
>> implementation.
> 
> It's somewhat off the table with it's GPL license.  But even so, I don't
> see that it helps here, we are not looking to continue execution, just
> more information on the crash than "Segmentation Fault".
> 
	I wonder if deadalnix isn't confusing with libSegFault which is
part of GNU's glibc: http://blog.andrew.net.au/2007/08/15/

		Jerome

PS: Sorry if this message is sent twice, there was an error the
first time and it looks like it didn't get through...
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120305/7554d9c4/attachment.pgp>


More information about the Digitalmars-d mailing list