digitalmars.D.bugs - [Issue 16309] New: DMD segfault with __traits(getProtection)
- via Digitalmars-d-bugs (25/25) Jul 21 2016 https://issues.dlang.org/show_bug.cgi?id=16309
https://issues.dlang.org/show_bug.cgi?id=16309 Issue ID: 16309 Summary: DMD segfault with __traits(getProtection) Product: D Version: D2 Hardware: x86 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: cauterite gmail.com With DMD 2.071.1, the following code segfaults the compiler: ( https://dpaste.dzfl.pl/f46383c7f31b ) import std.digest.crc; pragma(msg, __traits(getProtection, crcHexString)); The problem seems to revolve around this line: https://github.com/dlang/dmd/blob/05e9e840e1be228ce0b7db8618d881894977d43e/src/traits.d#L590 This 'crcHexString' symbol has a protection of 'PROTundefined' which causes 'protectionToChars()' to return null. In debug builds, the null triggers the assertion on the next line; in release builds, it triggers a segfault in 'new StringExp()'. Next step is find out why 'crcHexString' has 'PROTundefined'. --
Jul 21 2016