[Issue 16309] New: DMD segfault with __traits(getProtection)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 21 17:13:13 PDT 2016
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 at puremagic.com
Reporter: cauterite at 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'.
--
More information about the Digitalmars-d-bugs
mailing list