D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21797 - Stack overflow for forward-referenced enum min / max
Summary: Stack overflow for forward-referenced enum min / max
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-04-04 20:53 UTC by moonlightsentinel
Modified: 2021-04-04 22:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2021-04-04 20:53:43 UTC
The following code crashes DMD with a stack overflow:

enum Foo
{
    a,
    b = Foo.min,
    c
}
Comment 1 Dlang Bot 2021-04-04 20:53:58 UTC
@MoonlightSentinel created dlang/dmd pull request #12371 "Fix 21797 - Stack overflow for forward-referenced enum min / max" fixing this issue:

- Fix 21797 - Stack overflow for forward-referenced enum min / max
  
  Apply the fix for `.init` to `.min` / `.max`.
  See 54805374b0043a38c50f1ea13412004901e5797d

https://github.com/dlang/dmd/pull/12371
Comment 2 Dlang Bot 2021-04-04 22:55:37 UTC
dlang/dmd pull request #12371 "Fix 21797 - Stack overflow for forward-referenced enum min / max" was merged into master:

- 2ae90b863befa78b2479aedebc2db9941e67c231 by MoonlightSentinel:
  Fix 21797 - Stack overflow for forward-referenced enum min / max
  
  Apply the fix for `.init` to `.min` / `.max`.
  See 54805374b0043a38c50f1ea13412004901e5797d

https://github.com/dlang/dmd/pull/12371