Bug 15235 – inline asm: silent ICE (segfault) in asm_add_exp()
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2015-10-22T15:14:12Z
Last change time
2020-05-23T01:13:27Z
Keywords
diagnostic, iasm, pull
Assigned to
Cauterite
Creator
Cauterite
Comments
Comment #0 by cauterite — 2015-10-22T15:14:12Z
See: http://dpaste.dzfl.pl/701f26f64385
(in case dpaste is offline:)
This statement:
asm {mov [EBP - (0 - 0)], EAX;};
crashes DMD with no error message.
The crash is an access violation in asm_add_exp():
Line 3953: o2 = asm_mul_exp(); // o2 is now null
Line 3960: o2->disp = - o2->disp; // segfault
Downgraded to diagnostic. Nowadays just
void main()
{
asm {
mov [EBX+EBX+EBX], EAX; // prints the same error message 20 times
}
}
is still there and all the segfaults are not happening anymore
Comment #5 by dlang-bot — 2020-05-19T22:49:26Z
@benjones created dlang/dmd pull request #11166 "Fix issue 15235" fixing this issue:
- fix issue 15235. Return after spotting an asm syntax error rather than goto-ing it 10 times
https://github.com/dlang/dmd/pull/11166
Comment #6 by dlang-bot — 2020-05-23T01:13:27Z
dlang/dmd pull request #11166 "Fix issue 15235: inline asm: silent ICE (segfault) in asm_add_exp()" was merged into master:
- 185fd7155ea1dc7b22ed4b995ae12208d86f62e1 by Ben Jones:
fix issue 15235. Return after spotting an asm syntax error rather than goto-ing it 10 times
https://github.com/dlang/dmd/pull/11166