Bug 14424 – [REG2.066] dmd crashes with __traits(getUnitTests)

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-07T20:28:00Z
Last change time
2015-06-17T21:04:50Z
Keywords
ice, pull
Assigned to
nobody
Creator
atila.neves

Comments

Comment #0 by atila.neves — 2015-04-07T20:28:00Z
To reproduce (I tried this under /tmp and it didn't work, but under ~/coding/d/crash it did): example/example_crash.d: void main() { import tests.pass.crash; __traits(getUnitTests, tests.pass.crash); } tests/pass/crash.d: module tests.pass.crash; unittest { } Run `dmd -v -c -unittest example/example_crash.d`: binary dmd version v2.067 config /etc/dmd.conf parse example_crash importall example_crash import object (/usr/include/dlang/dmd/object.di) semantic example_crash entry main example/example_crash.d semantic2 example_crash semantic3 example_crash import tests.pass.crash (tests/pass/crash.d) zsh: segmentation fault (core dumped) dmd -v -c -unittest example/example_crash.d
Comment #1 by doob — 2015-04-08T07:33:45Z
Seems to be a regression, it works when I try with 2.065.0, but not with 2.066.0.
Comment #2 by k.hara.pg — 2015-04-18T11:20:55Z
Comment #3 by github-bugzilla — 2015-04-18T15:45:36Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cb1b813ebf6ded1135e46cc0de9229d9e6b5926d fix Issue 14424 - dmd crashes with __traits(getUnitTests) It was necessary to avoid excessive semantic3 with -unittest -inline (see commit 474e0d24191b0a964b38eae2ee5ba5eb972131b5), but today compiler incrementally runs semantic3 of the candidate functions for inlining (see commit df11f21be6873a944ee32cc3a664dd84387999b9). Therefore the hack is not necessary anymore. https://github.com/D-Programming-Language/dmd/commit/5f2bfa062e1741389d64fe7be78af06f8c4d415f Merge pull request #4593 from 9rnsr/fix14424 [REG2.066] Issue 14424 - dmd crashes with __traits(getUnitTests)
Comment #4 by github-bugzilla — 2015-04-18T15:52:24Z
Commit pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3c4801cf115bb9afba6e22346ba4f5ac96529cd6 Merge pull request #4593 from 9rnsr/fix14424 [REG2.066] Issue 14424 - dmd crashes with __traits(getUnitTests) Conflicts: src/func.c
Comment #5 by github-bugzilla — 2015-04-26T00:04:43Z
Comment #6 by github-bugzilla — 2015-06-17T21:04:50Z