Bug 5189 – throw in DLL

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2010-11-08T06:38:00Z
Last change time
2011-01-19T06:57:57Z
Assigned to
sean
Creator
zan77137

Comments

Comment #0 by zan77137 — 2010-11-08T06:38:52Z
An D'exception which occurred in the inside of DLL is not caught at the outside of DLL. It is necessary for druntime to be fixed if this is a bug. Perhaps there is the bug in the _object.d(L716). ---------------- override equals_t opEquals(Object o) { TypeInfo_Class c; return this is o || ((c = cast(TypeInfo_Class)o) !is null && this.info.name == c.classinfo.name); } ---------------- Is not this code a mistake of the following code? ---------------- override equals_t opEquals(Object o) { TypeInfo_Class c; return this is o || ((c = cast(TypeInfo_Class)o) !is null && this.info.name == c.info.name); // <-- c.classinfo.name => c.info.name } ---------------- The state of each evaluation is examined by the following. ---------------- module main; import std.stdio; class A { } void main() { auto a = new A; TypeInfo_Class c; auto id1 = typeid(cast(Object)a); auto id2 = typeid(A); bool b1 = id1 is id2; bool b2 = (c = cast(TypeInfo_Class)id2) !is null; bool b3 = id1.info.name == c.info.name; writefln("id1 == id2 : %s || (%s && %s)", b1, b2, b3); writefln("id1 == id2 : %s", id1 == id2); writefln("%s, %s, %s", id1.info.name, c.classinfo.name, c.info.name); } ---------------- Result: ---------------- id1 == id2 : true || (true && false) id1 == id2 : true main.A, TypeInfo_Class, main.A ----------------
Comment #1 by zan77137 — 2011-01-19T06:57:57Z