From 4330d7715f8b9d1dbadf7bcbfc9cf5ee9943e24f Mon Sep 17 00:00:00 2001 From: TanakaYasen Date: Sat, 17 Jan 2026 10:06:06 +0000 Subject: [PATCH] fix stunking in LeadingZeros over a jumbo vm section which dontdump (e.g. made by asan) --- src/elfcore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elfcore.cc b/src/elfcore.cc index c6a436d..2a7138e 100644 --- a/src/elfcore.cc +++ b/src/elfcore.cc @@ -906,7 +906,7 @@ static int CreateElfCore(void *handle, ssize_t (*writer)(void *, const void *, s mappings[i].flags = (mappings[i].flags >> 1) & PF_MASK; /* Skip leading zeroed pages (as found in the stack segment) */ - if ((mappings[i].flags & PF_R) && !is_device) { + if ((mappings[i].flags & PF_R) && !is_device && !dontdump) { zeros = LeadingZeros(loopback, (void *)mappings[i].start_address, mappings[i].end_address - mappings[i].start_address, pagesize); mappings[i].start_address += zeros;