D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7377 - Compiler segfault in: TemplateMixin::hasPointers()
Summary: Compiler segfault in: TemplateMixin::hasPointers()
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 03:41 UTC by pelo
Modified: 2015-06-09 05:13 UTC (History)
2 users (show)

See Also:


Attachments
Fixes this bug entirely... dereference of null. (691 bytes, patch)
2012-01-28 10:42 UTC, pelo
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pelo 2012-01-27 03:41:27 UTC
Using the latest built dmd/phobos/druntime code from git I get a compiler core dump:

Core was generated by `dmd -I../.. -g -debug -od../.obj -of../.obj/variant common.d variant.d ../teg/s'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000004f7a2f in TemplateMixin::hasPointers() ()
(gdb) bt
#0  0x00000000004f7a2f in TemplateMixin::hasPointers() ()
#1  0x000000000050cc0e in ClassDeclaration::toObjFile(int) ()
#2  0x00000000004a024f in Module::genobjfile(int) ()
#3  0x0000000000403c4f in main ()

I'm trying to build a minimal test case. dmd 2.047 has other compilation segfaults affecting my code, I'm a little worried I'll never be able to build my code with any D compiler above 2.046 again ;)
Comment 1 pelo 2012-01-28 10:41:17 UTC
Sorry meant 2.056.

I fixed it... have a patch.
Comment 2 pelo 2012-01-28 10:42:42 UTC
Created attachment 1070 [details]
Fixes this bug entirely... dereference of null.
Comment 3 github-bugzilla 2012-01-28 12:49:33 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1faafe155a3b80c4dfcee923f6312dc4f29cc9e7
Merge pull request #649 from nuisanceofcats/master

Fix issue 7377, compiler segfault via null pointer dereference
Comment 5 Trass3r 2012-01-28 14:27:29 UTC
I really wonder why members is NULL.