Lines Matching +full:sig +full:- +full:dir
23 # --- trap 0x9, rip = 0xffffffff8237cbac, rsp = 0xfffffe01026e4910, rbp = 0xfffffe01026e4980 ---
31 # --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8003b0a1a, rsp = 0x7fffdfffdbb8, rbp = 0x7fffdfffd…
36 # version: FreeBSD 13.0-CURRENT #0 r366401: Sat Oct 3 19:00:37 CEST 2020
40 [ `uname -p` != "amd64" ] && exit 0
43 kldstat -v | grep -q sctp || kldload sctp.ko
48 // Reported-by: syzbot+77fcf6a9d28f301bc2e5@syzkaller.appspotmail.com
79 static void segv_handler(int sig, siginfo_t* info, void* ctx __unused)
81 uintptr_t addr = (uintptr_t)info->si_addr;
86 if (sig == SIGBUS) {
92 exit(sig);
120 while (waitpid(-1, status, 0) != pid) {
149 static void __attribute__((noinline)) remove_dir(const char* dir)
151 DIR* dp = opendir(dir);
154 if (rmdir(dir))
162 if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
165 snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
177 if (rmdir(dir))
210 if (pthread_mutex_init(&ev->mu, 0))
212 if (pthread_cond_init(&ev->cv, 0))
214 ev->state = 0;
219 ev->state = 0;
224 pthread_mutex_lock(&ev->mu);
225 if (ev->state)
227 ev->state = 1;
228 pthread_mutex_unlock(&ev->mu);
229 pthread_cond_broadcast(&ev->cv);
234 pthread_mutex_lock(&ev->mu);
235 while (!ev->state)
236 pthread_cond_wait(&ev->cv, &ev->mu);
237 pthread_mutex_unlock(&ev->mu);
242 pthread_mutex_lock(&ev->mu);
243 int res = ev->state;
244 pthread_mutex_unlock(&ev->mu);
252 pthread_mutex_lock(&ev->mu);
254 if (ev->state)
256 uint64_t remain = timeout - (now - start);
260 pthread_cond_timedwait(&ev->cv, &ev->mu, &ts);
262 if (now - start > timeout)
265 int res = ev->state;
266 pthread_mutex_unlock(&ev->mu);
272 if (setsid() == -1)
311 event_wait(&th->ready);
312 event_reset(&th->ready);
313 execute_call(th->call);
315 event_set(&th->done);
329 if (!th->created) {
330 th->created = 1;
331 event_init(&th->ready);
332 event_init(&th->done);
333 event_set(&th->done);
336 if (!event_isset(&th->done))
338 event_reset(&th->done);
339 th->call = call;
341 event_set(&th->ready);
344 event_timedwait(&th->done, 45);
380 if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
383 if (current_time_ms() - start < 5 * 1000)
400 if (res != -1)
455 syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul);
467 mycc -o /tmp/syzkaller25 -Wall -Wextra -O0 /tmp/syzkaller25.c -lpthread ||
470 (cd ../testcases/swap; ./swap -t 1m -i 20 -h > /dev/null 2>&1) &
475 rm -rf /tmp/syzkaller25 /tmp/syzkaller25.c /tmp/syzkaller.*