https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63564

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You would need glibc compiled with -fsanitize=address (unless the write is done
in assembly) to detect that.
And, the reason that glibc malloc reports the problem is that it performs some
cheap checks, in particular if you happen to overwrite glibc malloc's internal
data structures, it will sometimes be able to cheaply detect that and report.
asan malloc doesn't have anything like that.
Expecting that -fsanitize=address will reveal all issues in your code is
unrealistic.

Reply via email to