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
==79752==ERROR: TypeSanitizer: type-aliasing-violation on address 0x000100c1c010 (pc 0x000100c168ec bp 0x00016f1eac30 sp 0x00016f1ea3b0 tid 32786625)
READ of size 4 at 0x000100c1c010 with type int accesses an existing object of type long (in <anonymous type> at offset 64)
#0 0x000100c168e8 in n test-preprocessed.c:17
Line 17 looks like it does nothing, but indeed if I comment it out, TySan no longer warns.
This reduced code is pretty nonsensical of course, but in the real code, it's using memcpy() precisely to avoid strict aliasing violations. Isn't memcpy() supposed to be the kosher way to copy anything of any size/alignment to anything else?
Also, and maybe I should make another ticket, but it's a shame the report says:
(in <anonymous type> at offset 64)
instead of:
(in 'struct h' at offset 64, field 'g')
The text was updated successfully, but these errors were encountered:
I have a TySan report that I think/thought is a false positive. So I used creduce to try and minimize it. It reduced down to the following:
TySan reports:
Line 17 looks like it does nothing, but indeed if I comment it out, TySan no longer warns.
This reduced code is pretty nonsensical of course, but in the real code, it's using memcpy() precisely to avoid strict aliasing violations. Isn't memcpy() supposed to be the kosher way to copy anything of any size/alignment to anything else?
Also, and maybe I should make another ticket, but it's a shame the report says:
(in <anonymous type> at offset 64)
instead of:
(in 'struct h' at offset 64, field 'g')
The text was updated successfully, but these errors were encountered: