Updates:
        Summary: ASAN coverage missing DTORs and inline functions

Comment #2 on issue 311 by [email protected]: ASAN coverage missing DTORs and inline functions
http://code.google.com/p/address-sanitizer/issues/detail?id=311

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)


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to