Open GoogleCodeExporter opened 9 years ago
Original comment by konstant...@gmail.com
on 19 May 2014 at 4:05
we have similar problem with regular functions, not just DTORs.
==> foo.cc <==
int Foo(int i) { return i; }
__attribute__((noinline))
int Bar() { return Foo(0); }
extern int Zab();
int main(int argc, char **argv) {
if (argc == 1) Bar();
else Zab();
}
==> zab.cc <==
extern int Foo(int i);
int Zab() { return Foo(1); }
We have two calls to Foo();
One call is inlined and is executed.
Another call is not inlined and is not executed.
The current asan coverage with -O2 will show that Foo() is present in the list
of instrumented symbols but is not covered.
I dislike both of the straightforward solutions (stop inlining and instrument
for coverage before inlining).
And I don't see any good performance-neutral solution...
The situation with empty DTORs is a bit different because empty DTORs are
inlined
even at -O1 (but not at -O0)
Original comment by konstant...@gmail.com
on 20 May 2014 at 7:33
Original issue reported on code.google.com by
aa...@google.com
on 19 May 2014 at 3:37