mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +00:00
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:
parent
6ffed14b9c
commit
d1d4388201
198 changed files with 130 additions and 2954 deletions
|
@ -23,7 +23,6 @@
|
|||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/calls/struct/iovec.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/intrin/describeflags.internal.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
|
@ -56,9 +55,7 @@ ssize_t sendmsg(int fd, const struct msghdr *msg, int flags) {
|
|||
union sockaddr_storage_bsd bsd;
|
||||
|
||||
BEGIN_CANCELATION_POINT;
|
||||
if (IsAsan() && !__asan_is_valid_msghdr(msg)) {
|
||||
rc = efault();
|
||||
} else if (fd < g_fds.n && g_fds.p[fd].kind == kFdZip) {
|
||||
if (fd < g_fds.n && g_fds.p[fd].kind == kFdZip) {
|
||||
rc = enotsock();
|
||||
} else if (!IsWindows()) {
|
||||
if (IsBsd() && msg->msg_name) {
|
||||
|
@ -91,8 +88,7 @@ ssize_t sendmsg(int fd, const struct msghdr *msg, int flags) {
|
|||
// TODO(jart): Write a DescribeMsg() function.
|
||||
if (strace_enabled(0) > 0) {
|
||||
kprintf(STRACE_PROLOGUE "sendmsg(%d, ", fd);
|
||||
if ((!IsAsan() && kisdangerous(msg)) ||
|
||||
(IsAsan() && !__asan_is_valid(msg, sizeof(*msg)))) {
|
||||
if (kisdangerous(msg)) {
|
||||
kprintf("%p", msg);
|
||||
} else {
|
||||
kprintf("{");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue