[Issue 6329] Out of range exceptions not thrown in certain cases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 13 05:17:38 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6329


Rainer Schuetze <r.sagitario at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario at gmx.de


--- Comment #12 from Rainer Schuetze <r.sagitario at gmx.de> 2012-04-13 05:18:24 PDT ---
Did you notice that the return code -1073741819 is 0xC0000005, which usually
means "Access Violation"?

I guess this is happening in the stack trace generation code that is executed
when an exception is thrown. This code is expensive, has to deal with
non-existing or buggy debug information and is unsafe itself. I recommend
disabling it by default.

I usually run this early from a shared static module constructor to disable it
(including always loading dbghelp.dll and debug symbols at startup):

extern extern(C) __gshared ModuleInfo
D4core3sys7windows10stacktrace12__ModuleInfoZ;

void disableStacktrace()
{
    ModuleInfo* info = &D4core3sys7windows10stacktrace12__ModuleInfoZ;
    *cast(typeof(info.o.ctor)*)(cast(void*)info + 8) = null;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list