]> git.kaiwu.me - njs.git/commit
Memory pool: junk filling only in debug builds
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 8 Sep 2026 22:46:52 +0000 (15:46 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Fri, 18 Sep 2026 20:42:16 +0000 (13:42 -0700)
commit964fad174d57ce8280afe92a652140ebb846141e
treef02d6a9ec49c79cee21a3f8e4b06c82bc5f5f1ed
parent90ae2f41bd9170dff5402def63fba38b474abdea
Memory pool: junk filling only in debug builds

Previously, every freed chunk was overwritten with 0x5A in all builds,
adding a memset to each njs_mp_free() call.

The fix is to keep the junk filling under NJS_DEBUG.  Release builds no
longer poison freed chunks; nothing ever inspected the pattern.
src/njs_mp.c