Skip to content

gh-131296: fix clang-cl warning in tracemalloc.c #131514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025

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