Issue 17812 - crash when building JSON info with static foreach
Summary: crash when building JSON info with static foreach
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-07 07:43 UTC by Rainer Schuetze
Modified: 2017-10-01 20:41 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Schuetze 2017-09-07 07:43:08 UTC
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 uplink.coder 2017-09-07 09:13:47 UTC
This is caused by STClocal not having a string representation.
Comment 2 timon.gehr 2017-09-07 20:29:52 UTC
https://github.com/dlang/dmd/pull/7127
Comment 3 github-bugzilla 2017-09-09 03:43:06 UTC
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 <WalterBright@users.noreply.github.com>
Comment 4 github-bugzilla 2017-10-01 20:41:02 UTC
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