[Issue 19968] @safe code can create invalid bools resulting in memory corruption

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 20 22:22:57 UTC 2019


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

--- Comment #12 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to Tim from comment #0)
> import std.stdio;
> void main() @safe
> {
>     bool b = void;
>     if(b)
>         writeln("b seems to be true");
>     if(!b)
>         writeln("b seems to be false");
> }
> 
> @trusted functions, that are correct for true and false may result in memory
> corruption for invalid values.

I've filed a new issue for this: issue 20148.

--


More information about the Digitalmars-d-bugs mailing list