Bug 13874 – Invalid FunctionTypeOf segfault the compiler

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-17T17:39:00Z
Last change time
2015-01-19T16:22:01Z
Keywords
ice, pull
Assigned to
nobody
Creator
pro.mathias.lang

Comments

Comment #0 by pro.mathias.lang — 2014-12-17T17:39:47Z
The following code crashes the compiler: ```` import std.traits : FunctionTypeOf; enum DummyEnum; static assert(!is(FunctionTypeOf!DummyEnum)); ```` % ./projects/dlang/dmd/src/dmd segv.d [3] 8952 segmentation fault (core dumped) Valgrind believes it's a stack overflow: ==8964== Stack overflow in thread 1: can't grow stack to 0xffe801f1c ==8964== ==8964== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==8964== Access not within mapped region at address 0xFFE801F1C ==8964== at 0x411591: TypeEnum::getProperty(Loc, Identifier*, int) (in /mnt/shared/projects/dlang/dmd/src/dmd) Tested with dmd 2.066.1 & master (v2.067-devel-1b8db26).
Comment #1 by k.hara.pg — 2015-01-19T15:26:03Z
Comment #2 by github-bugzilla — 2015-01-19T16:22:00Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1508918c64fdd1594400bcf1eee9f82c24a64bd3 fix Issue 13874 - Invalid FunctionTypeOf segfault the compiler https://github.com/D-Programming-Language/dmd/commit/b33b4ca2f487bb8a45df4366fec6b08f5fd086d3 Merge pull request #4313 from 9rnsr/fix13874 Issue 13874 - Invalid FunctionTypeOf segfault the compiler