Floating point exception
zyz9740 opened this issue · 2 comments
zyz9740 commented
int a, b, c;
int main() {
c = b;
long long d, e;
int f = b;
_Bool g;
for (;; b++) {
long h = g / e;
for (; f; ++e)
for (; c;) {
f = g = a;
if (h)
for (c = 0; d;)
;
}
}
return 0;
}
This case has a long-term compilation in O0, works well in O1 and O2, crashes and reports "Floating point exception" on O3. You can have a try.
carlopi commented
Hi,
here the problem I see is triggered by Assertion RHS.U.VAL != 0 && "Divide by zero?"
while the code g / e
is visited as part of the PartialInterpreter.
e
in this case will be 0, so it seems the check is right, and I expect it should be a matter of hoisting that check into visitOuter, but I will need to do also a review of other similar cases.
Hyxogen commented
Cannot reproduce