[Issue 22219] core.lifetime emplace is unsafe with void[] override
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 16 20:44:21 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22219
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@iK4tsu updated dlang/druntime pull request #3545 "Fix Issue 22219 -
core.lifetime emplace is unsafe with void[] override" fixing this issue:
- core.lifetime: fix class only function emplace system cast from a void[]
The emplace function is already making all the needed safety checks for
casting.
The cast only happens if both the length and alignment are compliant with the
type requested, allowing it to be safe.
Fix Issue 22219 - core.lifetime emplace is unsafe with void[] override
Signed-off-by: João Lourenço <jlourenco5691 at gmail.com>
- core.lifetime: fix non class function emplace system casts from a void[]
The emplace function is already making all the needed safety checks for
casting.
The cast only happens if both the length and alignment are compliant with the
type requested, allowing it to be safe.
Fix Issue 22219 - core.lifetime emplace is unsafe with void[] override
Signed-off-by: João Lourenço <jlourenco5691 at gmail.com>
https://github.com/dlang/druntime/pull/3545
--
More information about the Digitalmars-d-bugs
mailing list