bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of freed memory (GH-30434)

Automerge-Triggered-By: GH:tiran
(cherry picked from commit a4aa52dc28)

Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
Miss Islington (bot) 2022-01-06 07:36:47 -08:00 committed by GitHub
parent 72c260cf0c
commit b951dec441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -850,8 +850,13 @@ class PyMemDebugTests(unittest.TestCase):
def check(self, code): def check(self, code):
with support.SuppressCrashReport(): with support.SuppressCrashReport():
out = assert_python_failure('-c', code, out = assert_python_failure(
PYTHONMALLOC=self.PYTHONMALLOC) '-c', code,
PYTHONMALLOC=self.PYTHONMALLOC,
# FreeBSD: instruct jemalloc to not fill freed() memory
# with junk byte 0x5a, see JEMALLOC(3)
MALLOC_CONF="junk:false",
)
stderr = out.err stderr = out.err
return stderr.decode('ascii', 'replace') return stderr.decode('ascii', 'replace')

View file

@ -0,0 +1,2 @@
Fix test_capi on FreeBSD 14-dev: instruct jemalloc to not fill freed memory
with junk byte.