Delete ASAN

It hasn't been helpful enough to be justify the maintenance burden. What
actually does help is mprotect(), kprintf(), --ftrace and --strace which
can always be counted upon to work correctly. We aren't losing much with
this change. Support for ASAN on AARCH64 was never implemented. Applying
ASAN to the core libc runtimes was disabled many months ago. If there is
some way to have an ASAN runtime for user programs that is less invasive
we can potentially consider reintroducing support. But now is premature.
This commit is contained in:
Justine Tunney 2024-06-22 05:45:49 -07:00
parent 6ffed14b9c
commit d1d4388201
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
198 changed files with 130 additions and 2954 deletions

View file

@ -26,7 +26,6 @@
#include "libc/calls/syscall_support-sysv.internal.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/atomic.h"
#include "libc/intrin/cmpxchg.h"
#include "libc/intrin/directmap.internal.h"
@ -94,10 +93,6 @@ void __zipos_drop(struct ZiposHandle *h) {
return;
}
atomic_thread_fence(memory_order_acquire);
if (IsAsan()) {
__asan_poison((char *)h + sizeof(struct ZiposHandle),
h->mapsize - sizeof(struct ZiposHandle), kAsanHeapFree);
}
__zipos_lock();
do
h->next = h->zipos->freelist;
@ -125,12 +120,6 @@ StartOver:
h = __zipos_mmap_space(mapsize);
}
__zipos_unlock();
if (IsAsan()) {
__asan_unpoison((char *)h, sizeof(struct ZiposHandle) + size);
__asan_poison((char *)h + sizeof(struct ZiposHandle) + size,
mapsize - (sizeof(struct ZiposHandle) + size),
kAsanHeapOverrun);
}
if (h) {
atomic_store_explicit(&h->refs, 0, memory_order_relaxed);
h->size = size;