[Issue 15586] std.utf.toUTF8() segfaults when fed an invalid dchar
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jan 20 12:12:03 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15586
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #2 from hsteoh at quickfur.ath.cx ---
I don't understand something here. The in-contract of toUTF8 asserts that the
dchar must be valid... but why does the assert not trigger at runtime (even in
spite of not compiling with -release). This doesn't seem like a Phobos bug; it
seems to be a bug in the compiler for "optimizing" away the assert just because
it thinks that dchar's cannot have invalid values.
--
More information about the Digitalmars-d-bugs
mailing list