Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 20, 2025

Always set MAX_NFRAME to UINT16_MAX.

Avoid the complicated code which emitted a compiler warning.

Always set MAX_NFRAME to UINT16_MAX.

Avoid the complicated code which emitted a compiler warning.
@vstinner
Copy link
Member Author

65535 is already the effective limit:

$ python
Python 3.13.2 (main, Feb  4 2025, 00:00:00) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import tracemalloc; tracemalloc.start(2**16+1)
Traceback (most recent call last):
ValueError: the number of frames must be in range [1; 65535]

@vstinner vstinner removed needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Mar 22, 2025
@vstinner vstinner merged commit 9962469 into python:main Mar 22, 2025
45 checks passed
@vstinner vstinner deleted the tracemalloc branch March 22, 2025 09:38
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Always set MAX_NFRAME to UINT16_MAX.

Avoid the complicated code which emitted a compiler warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant