Bug 14027 – segmentation fault in dmd in some circular import situation

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2015-01-22T11:04:00Z
Last change time
2017-05-11T23:47:59Z
Keywords
industry
Assigned to
nobody
Creator
kanael

Attachments

IDFilenameSummaryContent-TypeSize
1471modules.tarneeded modules for recreating the bugapplication/x-tar3072

Comments

Comment #0 by kanael — 2015-01-22T11:04:50Z
Created attachment 1471 needed modules for recreating the bug When compiling the attached files with the following command line, dmd crashes with segfault. Note that the order of the modules in the command line matters. Command line: dmd module_a.d module_b.d Compiling with -v outputs this: binary dmd version v2.066.1 config /etc/dmd.conf parse module_a parse module_b importall module_a import object (/usr/include/dmd/druntime/import/object.di) importall module_b semantic module_a zsh: segmentation fault dmd -v module_a.d module_b.d
Comment #1 by bugzilla — 2017-05-11T23:46:42Z
The files are: ----------- module_a.d ----------- module module_a; import module_b; enum U = 1; ----------- module_b.d ----------- module module_b; import module_a; struct J(int M) {} struct Y { J!U x; } ----------------------------------
Comment #2 by bugzilla — 2017-05-11T23:47:59Z
It works without error when compile it with HEAD.