From 1429a7b3ef2230f4dc3c21bfd9bdab1f0c558e6f Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Thu, 2 Feb 2023 01:50:16 -0800 Subject: [PATCH] Fix bug in ASAN reporting --- libc/intrin/asan.c | 2 +- third_party/lua/luaformatstack.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libc/intrin/asan.c b/libc/intrin/asan.c index 1f35ea41c..b76fdec4b 100644 --- a/libc/intrin/asan.c +++ b/libc/intrin/asan.c @@ -1300,7 +1300,7 @@ void __asan_unregister_globals(struct AsanGlobal g[], int n) { void __asan_evil(uint8_t *addr, int size, const char *s) { struct AsanTrace tr; __asan_rawtrace(&tr, RBP); - kprintf("WARNING: ASAN bad %d byte %s at %x bt %x %x %x\n", size, s, addr, + kprintf("WARNING: ASAN bad %d byte %s at %lx bt %x %x %x\n", size, s, addr, tr.p[0], tr.p[1], tr.p[2], tr.p[3]); } diff --git a/third_party/lua/luaformatstack.c b/third_party/lua/luaformatstack.c index 374f6f9db..f0c5e55a2 100644 --- a/third_party/lua/luaformatstack.c +++ b/third_party/lua/luaformatstack.c @@ -21,9 +21,8 @@ #include "third_party/lua/lauxlib.h" dontdiscard char *LuaFormatStack(lua_State *L) { - size_t l; int i, top; - char *p, *b = 0; + char *b = 0; struct EncoderConfig conf = { .maxdepth = 64, .sorted = true,