[Issue 19968] @safe code can create invalid bools resulting in memory corruption
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 17 07:55:35 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19968
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Tim from comment #5)
> Maybe even types like ubyte can have the same problem on some architectures.
> If a parameter is stored in a register, which is bigger than the type, the
> compiler could assume the value is in the correct range. But an
> uninitialized variable could result in an uninitialized register.
When registers load a ubyte, and then the whole register is used, there must
have been a conversion from ubyte to the larger size first, so I don't think
this is an issue.
--
More information about the Digitalmars-d-bugs
mailing list