*** This issue has been marked as a duplicate of issue 22977 ***
Comment #2 by bugzilla — 2022-10-29T05:11:21Z
(In reply to Dennis from comment #1)
>
> *** This issue has been marked as a duplicate of issue 22977 ***
I thought it was a duplicate, too, but the PR for that does not detect the error.
Comment #3 by bugzilla — 2022-10-29T05:12:08Z
(In reply to Walter Bright from comment #2)
> I thought it was a duplicate, too, but the PR for that does not detect the
> error.
The PR is:
https://github.com/dlang/dmd/pull/14236
Comment #4 by bugzilla — 2022-10-29T05:13:27Z
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
Comment #5 by dlang-bot — 2022-10-29T05:34:56Z
@WalterBright created dlang/dmd pull request #14601 "Fix23438" fixing this issue:
- fix Issue 23438 - leaking address of stack
https://github.com/dlang/dmd/pull/14601
Comment #6 by dlang-bot — 2022-11-02T06:30:43Z
@WalterBright created dlang/dmd pull request #14610 "fix Issue 23445 - Can leak scope variable through delegate context" fixing this issue:
- fix Issue 23438 - leaking address of stack
https://github.com/dlang/dmd/pull/14610
Comment #7 by robert.schadek — 2024-12-13T19:25:13Z