← Back to index
|
Original Bugzilla link
Bug 18821 – DMD segfault when doing unsafe operation outside of any function
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-03T11:24:41Z
Last change time
2018-06-08T00:50:31Z
Keywords
ice
Assigned to
No Owner
Creator
Mr. Smith
Attachments
ID
Filename
Summary
Content-Type
Size
1694
18821trace.txt
Stack trace
text/plain
8380
Comments
Comment #0
by mrsmith33 — 2018-05-03T11:24:41Z
Happens on travis build. Cannot reproduce on Windows.
https://travis-ci.org/MrSmith33/voxelman/jobs/374350765
Comment #1
by bugzilla — 2018-05-14T13:21:56Z
Can you produce a smaller test case? Or run it under the debugger to find out where in DMD it is faulting?
Comment #2
by mrsmith33 — 2018-05-14T15:11:26Z
Looks like the issue was with dlib library Uploaded stacktrace as attachment Will try reducing code.
Comment #3
by mrsmith33 — 2018-05-14T15:12:18Z
Created attachment 1694 Stack trace
Comment #4
by mrsmith33 — 2018-05-14T16:05:11Z
Reduced to this: ``` module test18821; import std.experimental.allocator : makeArray; import core.sys.linux.epoll; class MmapPool { static MmapPool instance() { return null; } } void test() { epoll_event[] events = MmapPool.instance.makeArray!epoll_event(0); } ```
Comment #5
by ag0aep6g — 2018-05-14T21:38:16Z
Reduced further: ---- align(1) struct epoll_event { void* ptr; } template isAllZeroBits(epoll_event value) {} alias isInitAllZeroBits = isAllZeroBits!(epoll_event.init); ----
Comment #6
by bugzilla — 2018-05-15T01:06:53Z
Thank you. I was able to reproduce the problem.
Comment #7
by bugzilla — 2018-05-16T01:28:53Z
https://github.com/dlang/dmd/pull/8251
Comment #8
by github-bugzilla — 2018-05-16T17:01:41Z
Commits pushed to master at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/89e1a15977349b32761428bd3b42820ea4e1bca9
fix Issue 18821 - DMD segfault 2.080
https://github.com/dlang/dmd/commit/49c1475fd46b58f756dd20b7e37ee19af077e181
Merge pull request #8251 from WalterBright/fix18821 fix Issue 18821 - DMD segfault when doing unsafe operation outside of any function
Comment #9
by github-bugzilla — 2018-06-08T00:50:31Z
Commit pushed to master at
https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/b1aa95ffa6d99816c8d574af39371719e64a97be
Merge pull request #8251 from WalterBright/fix18821 fix Issue 18821 - DMD segfault when doing unsafe operation outside of any function