← Back to index
|
Original Bugzilla link
Bug 17124 – dmd segfaults on __traits(getMember, ...)
Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2017-01-27T13:36:49Z
Last change time
2022-11-14T14:27:07Z
Assigned to
No Owner
Creator
John Colvin
Comments
Comment #0
by john.loughran.colvin — 2017-01-27T13:36:49Z
// 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
Comment #1
by b2.temp — 2017-01-28T04:04:34Z
Neither 2.073 nor 2.074 alpha, with linux x86_64, crash with your code. Did you forget a line of code or something else ?
Comment #2
by mk — 2017-03-29T14:58:13Z
Can't reproduce it, either. Reopen, if new information.
Comment #3
by zoujiaqing — 2020-07-05T10:13:27Z
how to fix it?
Comment #4
by zoujiaqing — 2020-07-05T10:14:19Z
This issue needed :
https://github.com/huntlabs/hunt-framework/issues/153
Comment #5
by bitworld — 2020-07-05T11:57:13Z
See here:
https://issues.dlang.org/show_bug.cgi?id=21008.
Comment #6
by razvan.nitu1305 — 2022-11-14T14:27:07Z
I also cannot reproduce this. Why was this reopened?