fix: break sweep loop after tab removal; asan-gate defaults

This commit is contained in:
Andrew Hamilton 2026-09-11 09:12:58 +10:00
parent 6601e7801e
commit f4cd5f7f92
2 changed files with 29 additions and 0 deletions

15
kick.c
View file

@ -10,6 +10,20 @@
#define _GNU_SOURCE
/* Sanitizer-gate defaults: baked in so they survive the test harness's
env -i spawns (which would otherwise lose ASAN_OPTIONS). Compiled out
of normal builds entirely. */
#if defined(__SANITIZE_ADDRESS__)
const char *__asan_default_options(void) {
return "detect_leaks=0:halt_on_error=1";
}
#endif
#if defined(__SANITIZE_UNDEFINED__)
const char *__ubsan_default_options(void) {
return "halt_on_error=1:print_stacktrace=1";
}
#endif
#include <errno.h>
#include <execinfo.h>
#include <fcntl.h>
@ -11465,6 +11479,7 @@ static void sweep_dead_startup_groups(void) {
}
}
remove_tab(tab);
break; /* the tab is gone; stop walking its windows */
}
}
}

View file

@ -1,4 +1,18 @@
#define _GNU_SOURCE
/* Sanitizer-gate defaults: baked in so they survive the test harness's
env -i spawns (which would otherwise lose ASAN_OPTIONS). Compiled out
of normal builds entirely. */
#if defined(__SANITIZE_ADDRESS__)
const char *__asan_default_options(void) {
return "detect_leaks=0:halt_on_error=1";
}
#endif
#if defined(__SANITIZE_UNDEFINED__)
const char *__ubsan_default_options(void) {
return "halt_on_error=1:print_stacktrace=1";
}
#endif
#include <errno.h>
#include <fcntl.h>
#include <signal.h>