[Bug sanitizer/66308] -fsanitize=alignment is missing "downcast of misaligned address" checks

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 27 15:28:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66308

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Only the upcast is really a bug.  Downcasting is not a problem here.

The other way round, but I agree.

However, if the two casts happen in different translation units and only the
upcast is instrumented, it could be useful to get an error pointing out that
you were given a node* that cannot really point to an object of type node.



More information about the Gcc-bugs mailing list