union/toString: crash/segfault: What's happening here?

Adam D. Ruppe destructionator at gmail.com
Fri Jan 12 02:16:39 UTC 2018


On Friday, 12 January 2018 at 00:54:03 UTC, kdevel wrote:
> $ dmd crash.d
> $ ./crash

Nicholas Wilson is right that you can use = "" to work around it, 
but with strings, null is supposed to behave the same way.

And this gives different (each wrong) behavior on -m32 vs -m64, 
which leads me to believe you actually found a compiler bug.

Calling u.toString directly also leads to random spam, which 
means it isn't even the library.

I'd file this as a compiler codegen bug.


More information about the Digitalmars-d-learn mailing list