[Issue 12625] implicit slicing of RValue static array should be illegal
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 15 00:23:34 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=12625
--- Comment #12 from ZombineDev <petar.p.kirov at gmail.com> ---
(In reply to ZombineDev from comment #11)
> I don't think that it should be allowed even in @system code. I had a very
> ugly stack corruption because of this bug in a networking project.
> Thankfully, I had thorough unittests to catch it early, but still it wasn't
> obvious to track down at all.
Just to clarify - I'm talking about OP case. Slicing static arrays in general
can be @safe with enough escape analysis - e.g. when the slice doesn't outlive
the slicee.
--
More information about the Digitalmars-d-bugs
mailing list