[PATCH] D103304: Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always).
Kevin Athey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 1 10:32:40 PDT 2021
kda added inline comments.
================
Comment at: compiler-rt/lib/asan/asan_rtl.cpp:46
+
+int __asan_get_use_after_return_mode() {
+ return &__asan_use_after_return_mode ? __asan_use_after_return_mode : 1;
----------------
vitalybuka wrote:
> vitalybuka wrote:
> > we use __asan_... for interface functions names
> >
> > I assume none will call it outside of this file
> > so should be CamelCase and static
> >
> >
> > Maybe rename it InitAsanDetectUAROption() and move
> >
> > entire switch here?
> you can move this few lines below, or even better closer to the call and remove __asan:: prefixes
Moved to just above AsanInitInternal.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:2648
+ assert(ClUseAfterReturn != AsanDetectStackUseAfterReturnMode::Invalid);
+ Type *IntTy = Type::getInt32Ty(*C);
----------------
vitalybuka wrote:
> what we are going to do if different modules inserted the global with different values?
I don't know. I'm open to ideas.
How is it solved elsewhere?
Although, this is a very specific global.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103304/new/
https://reviews.llvm.org/D103304
More information about the llvm-commits
mailing list