[Issue 23445] Can leak scope variable through delegate context

2022-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 Tejas_Garhewal changed: What|Removed |Added CC||scientic...@gmail.com --- Comment #3 from T

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 Adam D. Ruppe changed: What|Removed |Added CC||destructiona...@gmail.com --- Comment #4 fro

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 --- Comment #5 from Walter Bright --- (In reply to timon.gehr from comment #2) > My initial example literally escapes a reference to a dead stack variable in > `@safe` code. Of course this is a problem. It is not a stack variable, though. It is allo

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 Walter Bright changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 --- Comment #6 from timon.g...@gmx.ch --- The delegate context is allocated on the heap. There is a `scope int* p` in that context, and this pointer points to the stack variable `x`. `qux` uses `foo` to escape a pointer to the local stack variable `x

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 --- Comment #7 from Walter Bright --- (In reply to timon.gehr from comment #6) > The delegate context is allocated on the heap. There is a `scope int* p` in > that context, and this pointer points to the stack variable `x`. > > `qux` uses `foo` to e

[Issue 23445] Can leak scope variable through delegate context

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
--- @WalterBright created dlang/dmd pull request #14610 "fix Issue 23445 - Can leak scope variable through delegate context" fixing this issue: - fix Issue 23445 - Can leak scope variable through delegate context https://github.com/dlang/dmd/pull/14610 --

[Issue 23445] Can leak scope variable through delegate context

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23445 Iain Buclaw changed: What|Removed |Added Priority|P1 |P3 --