Access Violation Tracking

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 7 06:30:42 PST 2014


On Fri, 07 Nov 2014 13:52:33 +0000
"Nordlöw" via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> On Friday, 7 November 2014 at 03:22:59 UTC, ketmar via 
> Digitalmars-d-learn wrote:
> > crash+coredump is alot more useful than intercepting error 
> > and...
> > trying to recover from undefined state? or just exit to OS, 
> > losing
> > valuable information about a crash?
> 
> Together with the DUB package backtrace this gives really nice 
> default behaviour printing stacktrace where memory fault occurred.
> 
> For details see my show case at:
> https://github.com/nordlow/justd/blob/master/t_errorHandler.d
but i don't want stacktrace! i want coredump, so i can inspect the
program, it's variables and it's internal state. i want to know *how*
*exactly* program manages to shot itself in the foot.

easily catchable segfaults are not surviving testing. and if segfault
survives, most of the time it's not enough to get stack trace, i need
to fire gdb with coredump and try to understand what the hell is going
on there.

i also developed a habit of writing assert()s before dereferencing
pointers first time (including class refs) in appropriate places, so
i'll got that stack trace for free. ;-) and i never turning off that
asserts in "release builds".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141107/50ef7afe/attachment.sig>


More information about the Digitalmars-d-learn mailing list