Re: [PATCH] libsanitizer: Fix 'unknown-crash' reported for partial buffer overflows

2025-06-19 Thread Wern Lim
Note: This patch is currently in discussion on llvm-project's side and may have minor tweaks. Once that's done, the patch will be redone by applying upstream changes. Wern On 13/6/25 12:40 pm, Wern Lim wrote: Given a partially misaligned memory read for a large number of bytes

[PATCH] libsanitizer: Fix 'unknown-crash' reported for partial buffer overflows

2025-06-12 Thread Wern Lim
Given a partially misaligned memory read for a large number of bytes (e.g., we allocate data at addr [0, 16) but read addr [2, 18)), the address sanitizer (asan) would flag the error as an 'unknown-crash' instead of a 'stack-buffer-overflow' when compiled with gcc. This is due to a flawed heuristi