[phobos] Calling abort() on unhandled exception

Steve Schveighoffer schveiguy at yahoo.com
Fri Jul 30 09:41:56 PDT 2010


Calm down :)  I don't know anything about stack traces, I thought you could not 
know the stack trace until you unwound the stack.  If that's not true, then 
excuse my ignorance, and by all means, call abort at the point the exception is 
thrown after printing a stack trace.

BTW, for some reason I just received 4 of your messages (including some dated 3 
hours ago) about 2 minutes ago.  So I wasn't exactly ignoring your posts ;)

-Steve



----- Original Message ----
> From: Leandro Lucarella <luca at llucax.com.ar>
> To: Discuss the phobos library for D 
><public-phobos-4o3eaN+cb9R8UrSeD/g0lQ at plane.gmane.org>
> Sent: Fri, July 30, 2010 11:45:24 AM
> Subject: Re: [phobos] Calling abort() on unhandled exception
> 
> 
> 
> Steve Schveighoffer, el 30 de julio a las 07:54 me escribiste:
> >  > From: Sean Kelly <sean-m2zzWtmgR3jd0EmSfiOO99i2O/JbrIOy at public.gmane.org>
> >  > To: Discuss the phobos library for D 
><phobos-4o3eaN+cb9R8UrSeD/g0lQ at public.gmane.org>
> > >  Sent: Fri, July 30, 2010 10:46:38 AM
> > > Subject: Re: [phobos] Calling  abort() on unhandled exception
> > > 
> > > That's the  thing.  With Leandro's proposed behavior, the stack isn't  
>unwound 
>
> > >because the exception is effectively never caught.  The  runtime can  still 
>print 
>
> > >the error message like it does now,  it just works as if from a  signal 
>handler.
> > >
> > 
> >  With stack trace?  I'd much rather have a stack trace than a core  file.  A 
>stack 
>
> > trace can easily be read, is easy to email/attach  to a bug report, and does 
>not 
>
> > require duplicating the entire  environment to use.
> 
> 
> Why this is SO hard to understand. Please, read  it carefully:
> 
> abort() != core dump
> abort() != not printing a stack  trace
> 
> You can have it all. You can print just an error message as Walter  and
> Andrei wants (which I think is just sick), you can print a stack  trace
> as you want (the same for me, I don't mind it) and *after* that,  call
> abort() (this is the only thing I care about).
> 
> The let the OS do  with the abort() whatever it want to do with it.
> abort() *will*  raise(SIGABRT) if the runtime is C99 (and POSIX)
> compilant. That's the only  thing guaranteed. On Linux, most
> distributions are configured by default with  ulimit -c 0, which WON'T
> DUMP A CORE. You can enable core dumping by  increasing the ulimit.
> 
> If you run the program from a debugger (at least  GDB), the SIGABRT will
> be caught by the debugger and will let you inspect the  program at the
> exact point the uncaught exception was thrown (regardless of  whatever
> you ulimit -c value is).
> 
> Please, confirm that you understand  this and then let's have
> a meaningful discussion.
> 
> -- 
> Leandro  Lucarella (AKA luca)                       http://llucax.com.ar/
> ----------------------------------------------------------------------
> GPG  Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A  8D05)
> ----------------------------------------------------------------------
> Your  success is measured by your ability to finish  things
> 
> _______________________________________________
> phobos mailing  list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
> 


      


More information about the phobos mailing list