[Issue 23438] leaking address of stack

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 29 05:13:27 UTC 2022


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

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
A smaller test case:

void qux()@safe{
    int* foo(return scope int* x)@safe{
        int* bar(return scope int* y)@safe{
            return x; (*)
        }
        return null;
    }
}

(*) compiler should complain that x is escaping via return

--


More information about the Digitalmars-d-bugs mailing list