[PATCH] D103304: Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always).

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 10:23:18 PDT 2021


vitalybuka accepted this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: compiler-rt/lib/asan/asan_rtl.cpp:26
 #include "asan_thread.h"
+#include "lsan/lsan_common.h"
 #include "sanitizer_common/sanitizer_atomic.h"
----------------
kda wrote:
> vitalybuka wrote:
> > why it's moved?
> I'm guessing the linter ordered it... as it is now alphabetical.
:) somehow I didn't notice that it's ordered now


================
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:
> 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


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