[PATCH] D15644: [asan] Use private aliases for global variables (compiler-rt part).

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 13:29:51 PST 2015


kcc added inline comments.

================
Comment at: test/asan/TestCases/Linux/local_alias.cc:15
@@ +14,3 @@
+long foo(long *);
+long h = 12;
+long i = 13;
----------------
m.ostapenko wrote:
> ygribov wrote:
> > kcc wrote:
> > > m.ostapenko wrote:
> > > > kcc wrote:
> > > > > isn't this a real ODR which we now will fail to detect? 
> > > > Yes, we can't detect ODR violation here, because libfoo.so is sanitized and libbar.so is not. But how could we do it with existing approach? And anyway, this particular testcase fails with CHECK on x86 and with false positive global buffer overflow on x86_64. I think it's better to miss ODR violation than just miserably die :). 
> > > With the current approach we do die, even though miserably. So, the bug is in fact detected. 
> > > Now we will miss it completely. Right? 
> > Well, we'd really die accidentally. It could also lead to all sorts of misbehavior or even go undetected. So I'd rather not consider this a real existing feature.
> > 
> > On the contrary, we'll now detect errors in libraries dlopened with RTLD_DEEPBIND or linked with -Bsymbolic.
> Right. But still, there's C code with semantic interposition that would fail here unconditionally. 
I don't consider this as a blocker, just want to check my understanding. 


Repository:
  rL LLVM

http://reviews.llvm.org/D15644





More information about the llvm-commits mailing list