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
There were several undefined behaviors marked by running ASan on this
code; all stemmed from using signed values, where unsigned would work.
There was an issue with abs(IV_MIN) not being representable in an IV on
a 2's complement machine; and left shifting a negative value is
undefined.
This commit solves this by converting to use an unsigned value, and
stealing the macro now in the perl core to take the abs(IV_MIN) without
undefined behavior.
I found myself drawing a picture to try to understand the behavior of
this. And I think the picture is clearer than the previous text. so I
changed to use it. And the intermediate results that were there really
just interrupted the flow of the picture, so I removed them.
0 commit comments