[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-10-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/ae05c4c834ee9944f8fc0ed21a990335bcf36c81
fix Issue 17370 - [scope] Escaping scope pointers possible via struct GC
allocation

https://github.com/dlang/dmd/commit/59e801d060ee13705cbf3bf73e1b4bc8a12aa60d
Merge pull request #7101 from WalterBright/fix17370

--


[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-09-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/ae05c4c834ee9944f8fc0ed21a990335bcf36c81
fix Issue 17370 - [scope] Escaping scope pointers possible via struct GC
allocation

https://github.com/dlang/dmd/commit/59e801d060ee13705cbf3bf73e1b4bc8a12aa60d
Merge pull request #7101 from WalterBright/fix17370

fix Issue 17370 - [scope] Escaping scope pointers possible via struct…
merged-on-behalf-of: Martin Nowak <c...@dawg.eu>

--


[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-09-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

--- Comment #3 from Walter Bright  ---
https://github.com/dlang/dmd/pull/7101

--


[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Note: compile with -dip1000 to repro the problem.

--


[Issue 17370] [scope] Escaping scope pointers possible via struct GC allocation

2017-08-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17370

ZombineDev  changed:

   What|Removed |Added

 CC||petar.p.ki...@gmail.com

--- Comment #1 from ZombineDev  ---
The issue is with only with the auto generated constructor. If you write one
yourself, you get:

void main () @safe
{
int* ptr = fwd();
assert(ptr !is null);
}

int* fwd () @safe
{
int i;
return new Struct().oops;
}

struct Struct
{
int* oops;
this(int* p) @safe { oops = p; }
}

scope_bug17370.d(10): Error: reference to local variable i assigned to
non-scope parameter p calling scope_bug17370.Struct.this

--