Bug 17812 – crash when building JSON info with static foreach

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-09-07T07:43:08Z
Last change time
2017-10-01T20:41:02Z
Assigned to
No Owner
Creator
Rainer Schuetze

Comments

Comment #0 by r.sagitario — 2017-09-07T07:43:08Z
Any use of static foreach seems to crash when generating JSON info during compilation, e.g.: static foreach(enum i; 0..3) mixin("int a" ~ i.stringof ~ " = 1;"); build with "dmd -c -X test.d": object.Error@(0): Access Violation ---------------- 0x00515D77
Comment #1 by uplink.coder — 2017-09-07T09:13:47Z
This is caused by STClocal not having a string representation.
Comment #2 by timon.gehr — 2017-09-07T20:29:52Z
Comment #3 by github-bugzilla — 2017-09-09T03:43:06Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/625ef5373c5469c0c01251fe17080318981ed52f fix Issue 17812 - crash when building JSON info with static foreach https://github.com/dlang/dmd/commit/d3eff8273875625cbdcfe624eff765d703e8d948 Merge pull request #7127 from tgehr/fix17812 fix Issue 17812 - crash when building JSON info with static foreach merged-on-behalf-of: Walter Bright <[email protected]>
Comment #4 by github-bugzilla — 2017-10-01T20:41:02Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/625ef5373c5469c0c01251fe17080318981ed52f fix Issue 17812 - crash when building JSON info with static foreach https://github.com/dlang/dmd/commit/d3eff8273875625cbdcfe624eff765d703e8d948 Merge pull request #7127 from tgehr/fix17812