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
Pointer subtraction in back-end: no need for bounds checking
5b8028a added pointer validity checks in the back-end when
performing pointer minus pointer operations. Given our pointer encoding
it seems important to do a same-object test as, for distinct objects,
the object identifier part would start to play into the subtraction.
When operating on the same object, however, even out-of-bounds pointers'
subtraction should be indistinguishable from how this works on actual
hardware.
Therefore, this commit removes the bounds-checking part. (C semantics
have a pointer-validity requirement, and we catch this via checks
inserted in the front-end as the regression test demonstrates. We do not
need to catch this in the back-end.)
0 commit comments