[llvm-commits] [compiler-rt] r147665 - in /compiler-rt/trunk/lib/asan: Makefile.old asan_rtl.cc
Kostya Serebryany
kcc at google.com
Fri Jan 6 10:02:04 PST 2012
Author: kcc
Date: Fri Jan 6 12:02:04 2012
New Revision: 147665
URL: http://llvm.org/viewvc/llvm-project?rev=147665&view=rev
Log:
[asan] cleanup: remove the SIGILL-related code (rt part)
Modified:
compiler-rt/trunk/lib/asan/Makefile.old
compiler-rt/trunk/lib/asan/asan_rtl.cc
Modified: compiler-rt/trunk/lib/asan/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/Makefile.old?rev=147665&r1=147664&r2=147665&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/Makefile.old (original)
+++ compiler-rt/trunk/lib/asan/Makefile.old Fri Jan 6 12:02:04 2012
@@ -77,7 +77,6 @@
ASAN_STACK=1
ASAN_GLOBALS=1
-ASAN_USE_CALL=1
ASAN_SCALE=0 # default will be used
ASAN_OFFSET=-1 #default will be used
ASAN_UAR=0
@@ -140,7 +139,6 @@
$(BLACKLIST) \
-mllvm -asan-stack=$(ASAN_STACK) \
-mllvm -asan-globals=$(ASAN_GLOBALS) \
- -mllvm -asan-use-call=$(ASAN_USE_CALL) \
-mllvm -asan-mapping-scale=$(ASAN_SCALE) \
-mllvm -asan-mapping-offset-log=$(ASAN_OFFSET) \
-mllvm -asan-use-after-return=$(ASAN_UAR) \
Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=147665&r1=147664&r2=147665&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Fri Jan 6 12:02:04 2012
@@ -60,7 +60,6 @@
uintptr_t FLAG_large_malloc;
bool FLAG_lazy_shadow;
bool FLAG_handle_segv;
-bool FLAG_handle_sigill;
bool FLAG_replace_str;
bool FLAG_replace_intrin;
bool FLAG_replace_cfallocator; // Used on Mac only.
@@ -335,23 +334,6 @@
ShowStatsAndAbort();
}
-static void ASAN_OnSIGILL(int, siginfo_t *siginfo, void *context) {
- // Write the first message using the bullet-proof write.
- if (12 != AsanWrite(2, "ASAN:SIGILL\n", 12)) ASAN_DIE;
- uintptr_t pc, sp, bp, ax;
- GetPcSpBpAx(context, &pc, &sp, &bp, &ax);
-
- uintptr_t addr = ax;
-
- uint8_t *insn = (uint8_t*)pc;
- CHECK(insn[0] == 0x0f && insn[1] == 0x0b); // ud2
- unsigned access_size_and_type = insn[2] - 0x50;
- CHECK(access_size_and_type < 16);
- bool is_write = access_size_and_type & 8;
- int access_size = 1 << (access_size_and_type & 7);
- __asan_report_error(pc, bp, sp, addr, is_write, access_size);
-}
-
// exported functions
#define ASAN_REPORT_ERROR(type, is_write, size) \
extern "C" void __asan_report_ ## type ## size(uintptr_t addr) \
@@ -465,7 +447,6 @@
}
static bool MySignal(int signum) {
- if (FLAG_handle_sigill && signum == SIGILL) return true;
if (FLAG_handle_segv && signum == SIGSEGV) return true;
#ifdef __APPLE__
if (FLAG_handle_segv && signum == SIGBUS) return true;
@@ -692,7 +673,6 @@
FLAG_report_globals = IntFlagValue(options, "report_globals=", 1);
FLAG_lazy_shadow = IntFlagValue(options, "lazy_shadow=", 0);
FLAG_handle_segv = IntFlagValue(options, "handle_segv=", ASAN_NEEDS_SEGV);
- FLAG_handle_sigill = IntFlagValue(options, "handle_sigill=", 0);
FLAG_symbolize = IntFlagValue(options, "symbolize=", 1);
FLAG_demangle = IntFlagValue(options, "demangle=", 1);
FLAG_debug = IntFlagValue(options, "debug=", 0);
@@ -743,7 +723,6 @@
MaybeInstallSigaction(SIGSEGV, ASAN_OnSIGSEGV);
MaybeInstallSigaction(SIGBUS, ASAN_OnSIGSEGV);
- MaybeInstallSigaction(SIGILL, ASAN_OnSIGILL);
if (FLAG_v) {
Printf("|| `[%p, %p]` || HighMem ||\n", kHighMemBeg, kHighMemEnd);
More information about the llvm-commits
mailing list