Thread overview
[Issue 20551] In @safe code and using delegates, it's possible to escape references to function frame
Feb 01, 2020
Basile-z
Feb 02, 2020
Basile-z
Feb 02, 2020
Basile-z
Feb 03, 2020
RazvanN
Feb 03, 2020
RazvanN
Feb 03, 2020
RazvanN
Feb 03, 2020
Dlang Bot
Feb 03, 2020
Dlang Bot
Feb 03, 2020
Basile-z
February 01, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
This is actually quite a new issue as this could not work before 2.090. I believe that https://github.com/dlang/dmd/pull/10509 lacked of review.

To the attention of nick@geany.org, just add a check to disable the new feature in @safe and this should be good ;)

--
February 02, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|nick@geany.org              |

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
Sorry the PR I mentioned is only a chagelog entry.

--
February 02, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #3 from Basile-z <b2.temp@gmx.com> ---
to the attention of RazvanN7, the change introduced in https://github.com/dlang/dmd/pull/10264 should not be allowed in @safe.

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

--- Comment #4 from RazvanN <razvan.nitu1305@gmail.com> ---
Yes, I agree, taking the address of a lazy variable should be disallowed in @safe code.

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

--- Comment #5 from RazvanN <razvan.nitu1305@gmail.com> ---
Will post a patch in 1-2 days, when I find the time.

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nobody@puremagic.com        |razvan.nitu1305@gmail.com

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
@RazvanN7 created dlang/dmd pull request #10756 "Fix Issue 20551 - In @safe code and using delegates, it's possible to escape references to function frame" fixing this issue:

- Fix Issue 20551 - In @safe code and using delegates, it's possible to escape references to function frame

https://github.com/dlang/dmd/pull/10756

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10756 "Fix Issue 20551 - In @safe code and using delegates, it's possible to escape references to function frame" was merged into master:

- 6201a270a92c93400f56776e2f77bdf2482944dc by RazvanN7:
  Fix Issue 20551 - In @safe code and using delegates, it's possible to escape
references to function frame

https://github.com/dlang/dmd/pull/10756

--
February 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20551

--- Comment #8 from Basile-z <b2.temp@gmx.com> ---
Thanks for your time Razvan.

--