aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@basename.se>2019-07-02 23:10:02 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-07-04 20:26:46 +0200
commit429efa16d6ca7fd282a93c614ef97612f9c9bf62 (patch)
treee1057875749275c571966ccf00dd016e11f9c4b6 /executor
parentdeef5fbc83e37ac11b9513d3e146b03b8c0b7d45 (diff)
executor: make errors during thread creation exit zero
On OpenBSD, the executor sometimes manages to set the memory resource limit 0 causing any following memory allocation to fail. Since threads are potentially created from such a thread which cannot allocate any memory, the executor will exit non-zero which in turn will cause false-positive panics to be reported. For more info see the discussion[1] in PR #1243. Instead, if hitting a fatal error during thread creation exit zero. [1] https://github.com/google/syzkaller/pull/1243
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/common.h b/executor/common.h
index 642b23102..05c759788 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -281,9 +281,9 @@ typedef struct {
static void event_init(event_t* ev)
{
if (pthread_mutex_init(&ev->mu, 0))
- fail("pthread_mutex_init failed");
+ exitf("pthread_mutex_init failed");
if (pthread_cond_init(&ev->cv, 0))
- fail("pthread_cond_init failed");
+ exitf("pthread_cond_init failed");
ev->state = 0;
}