[Issue 21821] Optimizer assumes immutables do not change, but they can in @system code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 12 08:34:59 UTC 2021


Mathias LANG <pro.mathias.lang at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |pro.mathias.lang at gmail.com

--- Comment #2 from Mathias LANG <pro.mathias.lang at gmail.com> ---
Where is this specified ? `immutable` should never change, that's the point!
I've never seen, nor heard, that `immutable` could be violated in `@system`.
This code in `core.lifetime` exhibits UB and should be changed to apply
`immutable` after the `memcpy`, e.g. as `assummeUnique` does.


More information about the Digitalmars-d-bugs mailing list