[Issue 16526] @safe code should do null check for members when appropriate

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Sep 22 11:48:02 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16526

--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Sobirari Muhomori from comment #1)
> struct S
> {
> 	byte[3000] a,b;
> }
> void f(ref S s)
> {
> 	g(s.b);
> }

Actually, technically this could trigger a check of s address, since b's data
is beyond the 1 page boundary.

--


More information about the Digitalmars-d-bugs mailing list