SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

gh-147988: Initialize digits in long_alloc() in debug mode (#147989)

When Python is built in debug mode:

* long_alloc() now initializes digits with a pattern to detect usage of
  uninitialized digits.
* _PyLong_CompactValue() now makes sure that the digit is zero when the
  sign is zero.
* PyLongWriter_Finish() now raises SystemError if it detects uninitialized
  digits

Co-authored-by: Serhiy Storchaka <[email protected]>
V
Victor Stinner committed
c1a4112c225e22d2707ff0a711353227e64f6fb5
Parent: a86963b
Committed by GitHub <[email protected]> on 4/2/2026, 11:55:34 AM