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 arithmetic (including 0 + ptr) has undefined behavior on null
pointers. That's why the (0 + x->field) trick to provide rvalue
access to struct fields is not generally safe with pointers.
Instead use no-op casts, which also produce rvalues.
Should fix these ASan errors (both from GvGP):
gv.c:2920:44: runtime error: applying zero offset to null pointer
sv.c:3855:25: runtime error: applying zero offset to null pointer
0 commit comments