aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Fuzzer/FuzzerUtil.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-05-27 00:54:15 +0000
committerKostya Serebryany <kcc@google.com>2016-05-27 00:54:15 +0000
commit0edb563f274876d97b6962ef088137936bc2893c (patch)
treee9e6b49831964a4cbe8df699185d8a1195e0c32b /llvm/lib/Fuzzer/FuzzerUtil.cpp
parent9ee054aea8c5d13177bcce85c7aa2ae88e7bfba0 (diff)
downloadllvm-0edb563f274876d97b6962ef088137936bc2893c.zip
llvm-0edb563f274876d97b6962ef088137936bc2893c.tar.gz
llvm-0edb563f274876d97b6962ef088137936bc2893c.tar.bz2
[libFuzzer] make OOM-handling more portable. Instead of sending a signal to the main fuzzing thread, print the message in the getrusage thread and exit.
llvm-svn: 270945
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerUtil.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerUtil.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerUtil.cpp b/llvm/lib/Fuzzer/FuzzerUtil.cpp
index 420f05d..c2ae94c 100644
--- a/llvm/lib/Fuzzer/FuzzerUtil.cpp
+++ b/llvm/lib/Fuzzer/FuzzerUtil.cpp
@@ -250,13 +250,6 @@ void SleepSeconds(int Seconds) {
}
int GetPid() { return getpid(); }
-int SignalToMainThread() {
-#ifdef __linux__
- return syscall(SYS_tgkill, GetPid(), GetPid(), SIGALRM);
-#else
- return 0;
-#endif
-}
std::string Base64(const Unit &U) {
static const char Table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"