[Issue 5009] New: TraceHandler not being called on Access Violation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 7 02:55:02 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5009
Summary: TraceHandler not being called on Access Violation
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: code at benjamin-thaut.de
--- Comment #0 from Benjamin Thaut <code at benjamin-thaut.de> 2010-10-07 02:54:34 PDT ---
The TraceHandler that is built into the core runtime is not being called on
Access Violation errors. Try this piece of sourcecode:
import std.stdio;
import core.runtime;
Throwable.TraceInfo TraceHandler1(void* ptr){
writefln("TraceHandler1");
return null;
}
Throwable.TraceInfo TraceHandler2(void* ptr){
writefln("TraceHandler2");
return null;
}
void main(string[] argv){
Runtime.traceHandler(&TraceHandler1);
try {
int[] array = new int[20];
array[20] = 0;
}
catch(Error e){
}
Runtime.traceHandler(&TraceHandler2);
int* ptr = null;
*ptr = 0;
}
TraceHandler2 is never being called. I tested this with dmd 2.046, 2.048 and
2.049.
--
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