From f3dc97debd6f464b997bbfe69bd0a426f36a6428 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 31 May 2024 15:18:30 -0400 Subject: handle general segfaults when accessing "dangerous" pointer values --- src/stdlib/__jkmalloc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stdlib/__jkmalloc.c b/src/stdlib/__jkmalloc.c index c7a5685b..e128a394 100644 --- a/src/stdlib/__jkmalloc.c +++ b/src/stdlib/__jkmalloc.c @@ -125,6 +125,10 @@ static void __jk_sigaction(int sig, siginfo_t *si, void *addr) __jk_undef(); + if (__dangerous.func) { + fprintf(stderr, "In call to %s, accessing parameter %s (%p)\n", __dangerous.func, __dangerous.param, __dangerous.addr); + } + if (!si) { __jk_error("No signal information provided", NULL, NULL); } -- cgit v1.2.1