[Issue 21690] Unable to dynamic cast extern(C++) classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 10 19:42:04 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21690

--- Comment #8 from thomas.bockman at gmail.com ---
(In reply to anonymous4 from comment #7)
> Calypso and dpp are the only hybrid D/C++ compilers around.

I knew about Calypso, but couldn't remember its name. Thanks for reminding me.

> I guess, it won't be too difficult to put a null pointer in C++ typeinfo
> place as a sentinel.

Good idea. If we can confirm by testing that this really turns unsafe
dynamic_casts on the C++ side into null pointer exceptions / segmentation
faults, then that plus a compile-time error on the D side should mitigate the
security and memory safety issues well enough to drop this from "critical" to
"enhancement".

--


More information about the Digitalmars-d-bugs mailing list