summaryrefslogtreecommitdiff
path: root/fuzz.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2018-01-08 14:19:29 +0100
committerRobert Swiecki <robert@swiecki.net>2018-01-08 14:19:29 +0100
commit77de8d4ed2663bc672c20d31542fde1a7eaf409b (patch)
tree00d6a38bc55d27b736dfa5646f0bddb4949b1161 /fuzz.c
parent03a52197a29b5215f886d82050c42374afb26efe (diff)
downloadhonggfuzz-77de8d4ed2663bc672c20d31542fde1a7eaf409b.tar.gz
fuzz: set thread name to HFUZZ-%d <threadno>
Diffstat (limited to 'fuzz.c')
-rw-r--r--fuzz.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzz.c b/fuzz.c
index e516ff85..1a67d4c8 100644
--- a/fuzz.c
+++ b/fuzz.c
@@ -632,6 +632,10 @@ static void* fuzz_threadNew(void* arg) {
unsigned int fuzzNo = ATOMIC_POST_INC(hfuzz->threads.threadsActiveCnt);
LOG_I("Launched new fuzzing thread, no. #%" PRId32, fuzzNo);
+ if (pthread_setname_np(pthread_self(), "HFUZZ-%" PRId32) != 0) {
+ PLOG_W("pthread_setname_np(pthread_self()) failed");
+ }
+
run_t run = {
.global = hfuzz,
.pid = 0,