This is an archive of the discontinued LLVM Phabricator instance.

Fix for bug 21725: wrong results with union and strict-aliasing
AbandonedPublic

Authored by jeroen.dobbelaere on Mar 4 2015, 6:01 AM.

Details

Summary

Generate path-aware tbaa for unions. This fixes an aliasing issue described in bug 21725.

Diff Detail

Event Timeline

jeroen.dobbelaere retitled this revision from to Fix for bug 21725: wrong results with union and strict-aliasing.
jeroen.dobbelaere updated this object.
jeroen.dobbelaere edited the test plan for this revision. (Show Details)
jeroen.dobbelaere added a subscriber: Unknown Object (MLST).
jeroen.dobbelaere abandoned this revision.Mar 17 2015, 7:37 AM

Further investigation shows that llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp is not ready to handle struct types where multiple members have the same (0) offset. The clang fix only makes sense once that issue is resolved.

hfinkel edited edge metadata.Mar 17 2015, 11:16 AM

Further investigation shows that llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp is not ready to handle struct types where multiple members have the same (0) offset. The clang fix only makes sense once that issue is resolved.

Can you work on this? If not (or even if you can), can you file a bug report with an example?

yinma added a subscriber: yinma.Jan 8 2016, 2:56 PM

Hello, I am wondering if the current llvm/clang's tbaa supports union or not?