logoalt Hacker News

aengelkeyesterday at 6:38 PM1 replyview on HN

It's probably worth noting that TySan currently only catches aliasing violations that LLVM would be able to exploit. For some types, e.g. unions, Clang doesn't emit accurate type-based aliasing information and therefore TySan won't catch these.


Replies

flohofwoeyesterday at 10:27 PM

Which is fine I think, considering that union type punning is legal in C (and even in C++ where union type punning is UB I have never seen it break - theoretically it might of course).