Bug 20829 – dmd segfault on jump from a TryCatchStatement to another

Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-13T22:20:22Z
Last change time
2021-04-15T22:11:20Z
Keywords
ice, patch
Assigned to
No Owner
Creator
kdevel

Attachments

IDFilenameSummaryContent-TypeSize
17870001-fix-issue-20829-dmd-segfault-on-jump-from-a-TryCatch.patchfix, targeting stabletext/plain1308

Comments

Comment #0 by kdevel — 2020-05-13T22:20:22Z
```crash.d class C { } C foo () { assert (false); } void ps () { try { auto se = foo (); goto K; } catch (Exception) { } try { K: auto se = foo (); } catch (Exception) { } return ps (); } void main () { } ``` STR: $ dmd crash.d result: Segmentation fault expected: exit code 0
Comment #1 by b2.temp — 2020-05-15T02:42:55Z
Comment #2 by b2.temp — 2020-05-15T02:44:59Z
Created attachment 1787 fix, targeting stable
Comment #3 by b2.temp — 2020-05-15T02:50:05Z
I have technical problems registering at GH so I cant propose the PR but the Consider doing the remaining part of the job using, $ git checkout -b issue-20829 $ git am 0001-fix-issue-20829-dmd-segfault-on-jump-from-a-TryCatch.patch after downloading the patch in your local dmd repository root. Later dont forget to target stable in GH interface.
Comment #4 by b2.temp — 2020-05-15T03:12:25Z
Sorry, dont create the PR because The fix introduces semantic changes that break - compilable/test602.d - compilable/interpret3.d as apparently it's legal to jump into a catch block.
Comment #5 by moonlightsentinel — 2021-04-15T22:11:20Z
The test case compiles with v2.094.2