Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-133256: Add _Py_NONSTRING macro#133257

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:nonstring
May 1, 2025
Merged

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 1, 2025
edited by bedevere-appbot
Loading

Fix GCC 15 compiler warnings such as:

Modules/fcntlmodule.c:27:36: warning: initializer-string forarray of 'char' truncates NUL terminator but destination lacks'nonstring' attribute (9 chars into 8 available)[-Wunterminated-string-initialization]static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58";

Fix GCC 15 compiler warnings such as:    Modules/fcntlmodule.c:27:36: warning: initializer-string for    array of 'char' truncates NUL terminator but destination lacks    'nonstring' attribute (9 chars into 8 available)    [-Wunterminated-string-initialization]    static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58";
@vstinner
Copy link
MemberAuthor

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, but infcntlmodule.c we could simply use array initializer.

@vstinnervstinner merged commite26bafd intopython:mainMay 1, 2025
49 checks passed
@vstinnervstinner deleted the nonstring branchMay 1, 2025 15:55
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbots390x Fedora Stable LTO + PGO 3.x (tier-3) has failed when building commite26bafd.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1627/builds/319) and take a look at the build logs.
  4. Check if the failure is related to this commit (e26bafd) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1627/builds/319

Summary of the results of the build (if available):

Click to see traceback logs
remote:Enumerating objects: 14, done.remote:Counting objects:   8% (1/12)remote:Counting objects:  16% (2/12)remote:Counting objects:  25% (3/12)remote:Counting objects:  33% (4/12)remote:Counting objects:  41% (5/12)remote:Counting objects:  50% (6/12)remote:Counting objects:  58% (7/12)remote:Counting objects:  66% (8/12)remote:Counting objects:  75% (9/12)remote:Counting objects:  83% (10/12)remote:Counting objects:  91% (11/12)remote:Counting objects: 100% (12/12)remote:Counting objects: 100% (12/12), done.remote:Compressing objects:  16% (1/6)remote:Compressing objects:  33% (2/6)remote:Compressing objects:  50% (3/6)remote:Compressing objects:  66% (4/6)remote:Compressing objects:  83% (5/6)remote:Compressing objects: 100% (6/6)remote:Compressing objects: 100% (6/6), done.remote:Total 14 (delta 7), reused 10 (delta 6), pack-reused 2 (from 1)From https://github.com/python/cpython * branch                    main       -> FETCH_HEADNote:switching to 'e26bafd107aa86a4bdd6051848640f36a56d0efb'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example:  git switch -c <new-branch-name>Or undo this operation with:  git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at e26bafd107a gh-133256: Add _Py_NONSTRING macro (#133257)Switched to and reset branch 'main'find:‘build’: No such file or directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directorymake[2]:[Makefile:3339: clean-retain-profile] Error 1 (ignored)Python/ceval.c:In function ‘_PyEvalFramePushAndInit_Ex’:Python/ceval.c:1887:38: warning: ‘stack_array’ may be used uninitialized [-Wmaybe-uninitialized] 1887 |     _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(|^~~~~~~~~~~~~~~~~~~~~~~~ 1888 |         tstate, func, locals,|~~~~~~~~~~~~~~~~~~~~~          1889 |         newargs, nargs, kwnames, previous|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1890 |     );|~                                 Python/ceval.c:1810:1: note: by argument 4 of type ‘const union _PyStackRef *’ to ‘_PyEvalFramePushAndInit’ declared here 1810 | _PyEvalFramePushAndInit(PyThreadState *tstate, _PyStackRef func,|^~~~~~~~~~~~~~~~~~~~~~~Python/ceval.c:1856:17: note: ‘stack_array’ declared here 1856 |     _PyStackRef stack_array[8];|^~~~~~~~~~~test test_time failedmake:*** [Makefile:1019: profile-run-stamp] Error 2

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

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@bedevere-bot@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp