D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7786 - dmd crashes with invalid module name
Summary: dmd crashes with invalid module name
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2012-03-27 08:30 UTC by SHOO
Modified: 2012-04-05 10:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description SHOO 2012-03-27 08:30:12 UTC
This codes crashes dmd!

------- src/a.d -------
module src.a;

------- [EOF] -------


------- src/b.d -------
module src; // Lack of the module name. (only the package name)

------- [EOF] -------

$ dmd src/b.d src/a.d

(File order of command line is necessary for reproduction.)
Comment 1 bearophile_hugs 2012-03-27 09:44:44 UTC
See also Issue 7782
Comment 2 Kenji Hara 2012-04-03 02:09:26 UTC
In 2.058:

$ dmd src/a.d src/b.d
src\b.d: Error: module src from file src\b.d conflicts with package name src

c:\d/
$ dmd src/b.d src/a.d
src\b.d: Error: module src module and package have the same name

This is a regression.
Comment 4 github-bugzilla 2012-04-05 10:10:08 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/49dff5907d282a36e7152b80ac2300ca54d98183
Merge pull request #864 from donc/regression7786

Fix issue 7786 dmd crashes with invalid module name