[Issue 17124] New: dmd segfaults on __traits(getMember, ...)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jan 27 05:36:49 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17124

          Issue ID: 17124
           Summary: dmd segfaults on __traits(getMember, ...)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at gmail.com

// test.d
alias BS = BSPu;
alias BS = BSPr;
template BSPu() { }
template BSPr() { }
enum blah = is(typeof(__traits(getMember, test, "BS")));

running `dmd test.d` segfaults, here's the backtrace:

* thread #1: tid = 0x42286e, 0x000000010008072e
dmd`resolvePropertiesOnly(Scope*, Expression*) + 798, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
    frame #0: 0x000000010008072e dmd`resolvePropertiesOnly(Scope*, Expression*)
+ 798
dmd`resolvePropertiesOnly:
->  0x10008072e <+798>: cmpb   $0x5, 0x8(%rcx)
    0x100080732 <+802>: jne    0x100080797               ; <+903>
    0x100080734 <+804>: cmpl   $0x0, 0x7c(%rdi)
    0x100080738 <+808>: jne    0x10008074c               ; <+828>
(lldb) bt all
* thread #1: tid = 0x42286e, 0x000000010008072e
dmd`resolvePropertiesOnly(Scope*, Expression*) + 798, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
  * frame #0: 0x000000010008072e dmd`resolvePropertiesOnly(Scope*, Expression*)
+ 798
    frame #1: 0x00000001000f1555 dmd`TypeTypeof::resolve(Loc, Scope*,
Expression**, Type**, Dsymbol**, bool) + 213
    frame #2: 0x00000001000f1841 dmd`TypeTypeof::semantic(Loc, Scope*) + 65
    frame #3: 0x00000001000e25b2 dmd`Type::trySemantic(Loc, Scope*) + 66
    frame #4: 0x000000010009184e dmd`IsExp::semantic(Scope*) + 182
    frame #5: 0x00000001000cbdbe dmd`ExpInitializer::inferType(Scope*) + 38
    frame #6: 0x000000010003742e dmd`VarDeclaration::semantic(Scope*) + 334
    frame #7: 0x00000001000585de dmd`Module::semantic(Scope*) + 118
    frame #8: 0x00000001000df926 dmd`D4ddmd4mars7tryMainFmPPxaZi + 13494
    frame #9: 0x0000000100003273 dmd`_Dmain + 39
    frame #10: 0x00000001002438cc
dmd`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
    frame #11: 0x00000001002437f4
dmd`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 32
    frame #12: 0x0000000100243871
dmd`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv + 45
    frame #13: 0x00000001002437f4
dmd`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 32
    frame #14: 0x0000000100243767 dmd`_d_run_main + 459
    frame #15: 0x000000010000330c dmd`main + 16
    frame #16: 0x00000001000018b4 dmd`start + 52

--


More information about the Digitalmars-d-bugs mailing list