Lines Matching +full:sig +full:- +full:dir
3 # panic: ASan: Invalid access, 32-byte read at 0xfffffe01f76145a0, UseAfterScope(f8)
23 # --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8003afafa, rsp = 0x7fffdfffdf58, rbp = 0x7fffdfffd…
28 # version: FreeBSD 14.0-CURRENT #0 main-n250242-eab5358b9080-dirty: Mon Oct 25 11:32:45 CEST 2021
29 # pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO-KASAN
32 [ `uname -p` != "amd64" ] && exit 0
33 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
34 [ "`sysctl -in kern.features.kasan`" != "1" ] && exit 0
40 // Reported-by: syzbot+a5898c11651b423b501f@syzkaller.appspotmail.com
69 static void segv_handler(int sig, siginfo_t* info, void* ctx __unused)
71 uintptr_t addr = (uintptr_t)info->si_addr;
76 if (sig == SIGBUS)
81 exit(sig);
109 while (waitpid(-1, status, 0) != pid) {
138 static void __attribute__((noinline)) remove_dir(const char* dir)
140 DIR* dp = opendir(dir);
143 if (rmdir(dir))
151 if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
154 snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
166 if (rmdir(dir))
199 if (pthread_mutex_init(&ev->mu, 0))
201 if (pthread_cond_init(&ev->cv, 0))
203 ev->state = 0;
208 ev->state = 0;
213 pthread_mutex_lock(&ev->mu);
214 if (ev->state)
216 ev->state = 1;
217 pthread_mutex_unlock(&ev->mu);
218 pthread_cond_broadcast(&ev->cv);
223 pthread_mutex_lock(&ev->mu);
224 while (!ev->state)
225 pthread_cond_wait(&ev->cv, &ev->mu);
226 pthread_mutex_unlock(&ev->mu);
231 pthread_mutex_lock(&ev->mu);
232 int res = ev->state;
233 pthread_mutex_unlock(&ev->mu);
241 pthread_mutex_lock(&ev->mu);
243 if (ev->state)
245 uint64_t remain = timeout - (now - start);
249 pthread_cond_timedwait(&ev->cv, &ev->mu, &ts);
251 if (now - start > timeout)
254 int res = ev->state;
255 pthread_mutex_unlock(&ev->mu);
298 event_wait(&th->ready);
299 event_reset(&th->ready);
300 execute_call(th->call);
302 event_set(&th->done);
316 if (!th->created) {
317 th->created = 1;
318 event_init(&th->ready);
319 event_init(&th->done);
320 event_set(&th->done);
323 if (!event_isset(&th->done))
325 event_reset(&th->done);
326 th->call = call;
328 event_set(&th->ready);
331 event_timedwait(&th->done, 50);
367 if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
370 if (current_time_ms() - start < 5000)
392 syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul);
399 mycc -o /tmp/syzkaller47 -Wall -Wextra -O0 /tmp/syzkaller47.c -lpthread || exit 1
403 rm -rf /tmp/syzkaller47 /tmp/syzkaller47.c /tmp/syzkaller.*