>
>
> Here is one example which currently works by pure luck:
>
> INTERCEPTOR(int, sigaction, int signum, const struct sigaction *act,
> struct sigaction *oldact) {
> if (!AsanInterceptsSignal(signum) ||
> common_flags()->allow_user_segv_handler) {
> return REAL(sigaction)(signum, act, oldact);
> }
>
Agree, this may need to be fixed.
> Note the lack of ENSURE_ASAN_INITED - this may easily result in call
> to NULL function if we preload libasan to unsanitized executable which
> calls signal() at start of main. The only reason why it manages to
> work is because libstdc++ calls __cxa_atexit at start and this calls
> ENSURE_ASAN_INITED. But relying on __cxa_atexit is surely messy.
>
> Having an __attribute__((constructor)) for __asan_init would clean all
> this stuff up.
>
> > Ah. Now I remember this. Yes, we may want to improve the warning to
> handle
> > the PLT case.
> > No idea how, and the change would need to be testable in LLVM tree,
> which in
> > turn requires that
> > we build and support asan-dso in llvm tree as a non-default alternative
> to
> > the static run-time.
> > We may eventually get to it, but no promises.
>
> Well, I'll keep hoping then)
>
Patches are welcome, as usual. :) :) :)
We'll need to hack both cmake and configure to produce a DSO, make all
tests run with dso
(except where they are broken), add separate tests to run with LD_PRELOAD,
add a driver flag to clang to use dso, make sure all TLS vars in all
sanitizers are initial-exec,
do something to prohibit dlopen for this dso (and add a test).
Extend the wiki explaining why one should not use DSO if at all possible
and what troubles await him if he does. :)
Perhaps something else.
I am not trying to say that if you don't make these patches we will never
get to them.
We may eventually. But this is nowhere at the top of our current list.
--kcc
>
> -Y
>
> --
> 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/groups/opt_out.
>
--
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/groups/opt_out.