Lines Matching +full:sig +full:- +full:dir

30 # --- trap 0xc, rip = 0xffffffff80d3c17b, rsp = 0xfffffe00e49fab80, rbp = 0xfffffe00e49facc0 ---
39 # --- trap 0, rip = 0, rsp = 0, rbp = 0 ---
44 # version: FreeBSD 14.0-CURRENT #0 main-n264110-43ed91e00bbb1: Tue Jul 11 06:28:21 CEST 2023
48 uname -p | grep -Eq "amd64" || exit 0
49 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
56 // Reported-by: syzbot+e7d2e451f89fb444319b@syzkaller.appspotmail.com
88 static void segv_handler(int sig, siginfo_t* info, void* ctx __unused)
91 exit(sig);
93 uintptr_t addr = (uintptr_t)info->si_addr;
98 if (sig == SIGBUS)
103 exit(sig);
131 while (waitpid(-1, status, 0) != pid) {
170 static void __attribute__((noinline)) remove_dir(const char* dir)
172 DIR* dp = opendir(dir);
175 if (rmdir(dir))
183 if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
186 snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
197 reset_flags(dir);
205 while (rmdir(dir)) {
207 reset_flags(dir);
208 if (rmdir(dir) == 0)
244 if (pthread_mutex_init(&ev->mu, 0))
246 if (pthread_cond_init(&ev->cv, 0))
248 ev->state = 0;
253 ev->state = 0;
258 pthread_mutex_lock(&ev->mu);
259 if (ev->state)
261 ev->state = 1;
262 pthread_mutex_unlock(&ev->mu);
263 pthread_cond_broadcast(&ev->cv);
268 pthread_mutex_lock(&ev->mu);
269 while (!ev->state)
270 pthread_cond_wait(&ev->cv, &ev->mu);
271 pthread_mutex_unlock(&ev->mu);
276 pthread_mutex_lock(&ev->mu);
277 int res = ev->state;
278 pthread_mutex_unlock(&ev->mu);
286 pthread_mutex_lock(&ev->mu);
288 if (ev->state)
290 uint64_t remain = timeout - (now - start);
294 pthread_cond_timedwait(&ev->cv, &ev->mu, &ts);
296 if (now - start > timeout)
299 int res = ev->state;
300 pthread_mutex_unlock(&ev->mu);
343 event_wait(&th->ready);
344 event_reset(&th->ready);
345 execute_call(th->call);
347 event_set(&th->done);
359 if (!th->created) {
360 th->created = 1;
361 event_init(&th->ready);
362 event_init(&th->done);
363 event_set(&th->done);
366 if (!event_isset(&th->done))
368 event_reset(&th->done);
369 th->call = call;
371 event_set(&th->ready);
374 event_timedwait(&th->done, 50);
406 if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
409 if (current_time_ms() - start < 5000)
426 if (res != -1)
458 if (res != -1)
474 syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul);
486 mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c -lpthread || exit 1
488 (cd ../testcases/swap; ./swap -t 2m -i 10 -l 100 > /dev/null 2>&1) &
493 rm -rf /tmp/$prog /tmp/$prog.c /tmp/syzkaller.*