Jump to page: 1 2
Thread overview
[Issue 17423] @safe code seg faults
May 23, 2017
Eyal
May 24, 2017
Vladimir Panteleev
May 24, 2017
Vladimir Panteleev
May 24, 2017
Vladimir Panteleev
May 29, 2017
Walter Bright
May 29, 2017
Eyal
[Issue 17423] pointer assignment to `this` in member function is not accounted for
Mar 11, 2018
Walter Bright
Mar 11, 2018
Walter Bright
Mar 11, 2018
Walter Bright
Mar 11, 2018
Walter Bright
Jun 27, 2018
Walter Bright
May 23, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

--- Comment #1 from Eyal <eyal@weka.io> ---
I think foreach on delegates (opApply or delegates) should require the delegate parameter to be marked "scope" since it really must not escape.

--
May 24, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com

--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Wow, that's pretty evil :)

opApply is showing its age here.

--
May 24, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--
May 24, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, safe

--
May 29, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
When I compile and run it, it prints:

2

and does not crash. What compiler/system are you using?

--
May 29, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

--- Comment #4 from Eyal <eyal@weka.io> ---
dmd --version && dmd -unittest -main -run test17423.d
DMD64 D Compiler v2.074.0
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright
/tmp/dmd_rundz8iAQ(_D4core7runtime18runModuleUnitTestsUZ19unittestSegvHandlerUNbiPS4core3sys5posix6signal9siginfo_tPvZv+0x38)[0x443804]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f76b6ce1390]
Error: program killed by signal 11

--
May 29, 2017
https://issues.dlang.org/show_bug.cgi?id=17423

greensunny12@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #5 from greensunny12@gmail.com ---
DPaste and I can confirm the segfault: https://dpaste.dzfl.pl/c678a3ce7bf2

--
March 11, 2018
https://issues.dlang.org/show_bug.cgi?id=17423

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|@safe code seg faults       |pointer assignment to
                   |                            |`this` in member function
                   |                            |is not accounted for

--
March 11, 2018
https://issues.dlang.org/show_bug.cgi?id=17423

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---
The opApply is actually working correctly. The bug is that the dlg parameter was incorrectly inferred as `scope`.

--
March 11, 2018
https://issues.dlang.org/show_bug.cgi?id=17423

--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> ---
https://github.com/dlang/dmd/pull/7999

--
« First   ‹ Prev
1 2