Skip to content

gh-149706: fix -Wstringop-truncation warning #150022

Open
sthapa wants to merge 2 commits into
python:mainfrom
sthapa:main
Open

gh-149706: fix -Wstringop-truncation warning #150022
sthapa wants to merge 2 commits into
python:mainfrom
sthapa:main

Conversation

@sthapa
Copy link
Copy Markdown

@sthapa sthapa commented May 18, 2026

Fixes -Wstringop-truncation warning in socketmodule.c getsockaddrarg() by wrapping _Py_NO_SANITIZE_ADDRESS in a DIAG PUSH and POP

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 18, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 18, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 18, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@encukou
Copy link
Copy Markdown
Member

encukou commented May 18, 2026

This won't do anything since the #define line doesn't cause warnings.
Please wrap the strncpy call in the _Py_COMP_DIAG_PUSH/_Py_COMP_DIAG_POP macros, and define a new _Py* macro for the stringop-truncation warning in GCC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants