Skip to content

Commit

Permalink
[3.9] bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of f…
Browse files Browse the repository at this point in the history
…reed memory (GH-30434) (GH-30437)

Co-authored-by: Christian Heimes <christian@python.org>
  • Loading branch information
miss-islington and tiran committed Jan 6, 2022
1 parent cb06831 commit b259015
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Lib/test/test_capi.py
Expand Up @@ -763,8 +763,13 @@ class PyMemDebugTests(unittest.TestCase):

def check(self, code):
with support.SuppressCrashReport():
out = assert_python_failure('-c', code,
PYTHONMALLOC=self.PYTHONMALLOC)
out = assert_python_failure(
'-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
return stderr.decode('ascii', 'replace')

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

0 comments on commit b259015

Please sign in to comment.