https://llvm.org/bugs/show_bug.cgi?id=25550
Bug ID: 25550 Summary: asan conflicts with gvn Product: new-bugs Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: k...@google.com Reporter: k...@google.com CC: aizat...@chromium.org, llvm-bugs@lists.llvm.org, st...@mit.edu Classification: Unclassified [initially reported by Greg Stark: http://lists.llvm.org/pipermail/llvm-dev/2015-November/092484.html] Reproducer: typedef union { short q; struct { short x; short y; int for_alignment; } w; } U; int main() { char *buf = new char[2]; buf[0] = buf[1] = 0x0; U *u = (U *)buf; return u->q == 0 ? 0 : u->w.y; } gvn will speculatively combine two 2-byte loads into one, thus moving one of the loads outside of the conditional pass. We've seen these problems in the past, and have at least two guards against those: lib/Analysis/MemoryDependenceAnalysis.cpp: Attribute::SanitizeAddress)) lib/Analysis/ValueTracking.cpp: Attribute::SanitizeAddress)) but none of these two help here. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs