You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I won't pretend to know what's going on in this function, but it's creating an ARM FPU fault.
I can trace through the code, and have found the following results in a div by 0.
// check if final y_crossing is blown up; no test case for this
if (y_final > y_bottom) {
y_final = y_bottom;
dy = (y_final - y_crossing ) / (x2 - (x1+1)); // if denom=0, y_final = y_crossing, so y_final <= y_bottom
}
In this case, y_final=-14 y_crossing=-14 x2=21 and x1=20.
The ARM FPU fault then occurs on:
step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x,
I've temporarily prevented the fault from happening by:
// check if final y_crossing is blown up; no test case for this
if (y_final > y_bottom) {
y_final = y_bottom;
int div = x2 - (x1+1);
if (div == 0) div = 1;
dy = (y_final - y_crossing ) / div;
}
I'm guessing this isn't the correct way to go about fixing this though?
I've just tripped over the same bug. Working fine for many fonts and scales, but hits the divide by zero.
So it looks like the precondition doesn't hold.
Edit: Yes, this appears to be related to the fix for #1057.
Also, if useful I can package up a reproducer. Painfully (I've, um, "ported" this to Plan 9), so really only if it can be useful.
I won't pretend to know what's going on in this function, but it's creating an ARM FPU fault.
I can trace through the code, and have found the following results in a div by 0.
In this case, y_final=-14 y_crossing=-14 x2=21 and x1=20.
The ARM FPU fault then occurs on:
If it matters, the font is: https://www.fontrepo.com/font/4274/painting-with-chocolate
Thanks!
The text was updated successfully, but these errors were encountered: