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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 15 13:26:23 UTC 2019


timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
                 CC|                            |timon.gehr at gmx.ch

--- Comment #2 from timon.gehr at gmx.ch ---
Note that there is a general problem with `void` initialization, not only of
bools but for all data types that have a (possibly implicit) invariant. If
@safe code can `void`-initialize a struct with private members, @trusted code
can't establish any invariants, which would cripple it.


More information about the Digitalmars-d-bugs mailing list