[PATCH] D62489: [HWASAN] Remove unused(?) code

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 03:10:55 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT361942: [HWASAN] Remove unused code (authored by evgeny777, committed by ).
Herald added projects: LLVM, Sanitizers.
Herald added a subscriber: Sanitizers.

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62489/new/

https://reviews.llvm.org/D62489

Files:
  lib/hwasan/hwasan_interceptors.cpp
  lib/hwasan/hwasan_thread.h


Index: lib/hwasan/hwasan_interceptors.cpp
===================================================================
--- lib/hwasan/hwasan_interceptors.cpp
+++ lib/hwasan/hwasan_interceptors.cpp
@@ -44,24 +44,6 @@
 using __sanitizer::atomic_store;
 using __sanitizer::atomic_uintptr_t;
 
-bool IsInInterceptorScope() {
-  Thread *t = GetCurrentThread();
-  return t && t->InInterceptorScope();
-}
-
-struct InterceptorScope {
-  InterceptorScope() {
-    Thread *t = GetCurrentThread();
-    if (t)
-      t->EnterInterceptorScope();
-  }
-  ~InterceptorScope() {
-    Thread *t = GetCurrentThread();
-    if (t)
-      t->LeaveInterceptorScope();
-  }
-};
-
 static uptr allocated_for_dlsym;
 static const uptr kDlsymAllocPoolSize = 1024;
 static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize];
@@ -254,11 +236,6 @@
   return pid;
 }
 
-
-struct HwasanInterceptorContext {
-  bool in_interceptor_scope;
-};
-
 namespace __hwasan {
 
 int OnExit() {
Index: lib/hwasan/hwasan_thread.h
===================================================================
--- lib/hwasan/hwasan_thread.h
+++ lib/hwasan/hwasan_thread.h
@@ -46,10 +46,6 @@
   void EnterSymbolizer() { in_symbolizer_++; }
   void LeaveSymbolizer() { in_symbolizer_--; }
 
-  bool InInterceptorScope() { return in_interceptor_scope_; }
-  void EnterInterceptorScope() { in_interceptor_scope_++; }
-  void LeaveInterceptorScope() { in_interceptor_scope_--; }
-
   AllocatorCache *allocator_cache() { return &allocator_cache_; }
   HeapAllocationsRingBuffer *heap_allocations() { return heap_allocations_; }
   StackAllocationsRingBuffer *stack_allocations() { return stack_allocations_; }
@@ -82,7 +78,6 @@
 
   unsigned in_signal_handler_;
   unsigned in_symbolizer_;
-  unsigned in_interceptor_scope_;
 
   u32 random_state_;
   u32 random_buffer_;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62489.201852.patch
Type: text/x-patch
Size: 1803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190529/cb985687/attachment.bin>


More information about the llvm-commits mailing list