gh-121459: Add missing return to _PyDict_LoadGlobalStackRef#124085
Merged
colesbury merged 1 commit intopython:mainfrom Sep 14, 2024
Merged
gh-121459: Add missing return to _PyDict_LoadGlobalStackRef#124085colesbury merged 1 commit intopython:mainfrom
colesbury merged 1 commit intopython:mainfrom
Conversation
We need to return immediately if there's an error during dictionary lookup. Also avoid the conditional-if operator. The Windows 10 buildbot seems to miscompile that for unknown reasons.
Contributor
Author
|
!buildbot AMD64 Windows10 |
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit c8c59a1 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
colesbury
commented
Sep 14, 2024
Comment on lines
+1553
to
+1558
| if (val == NULL) { | ||
| *value_addr = PyStackRef_NULL; | ||
| } | ||
| else { | ||
| *value_addr = PyStackRef_FromPyObjectNew(val); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
So... I think MSVC 1916 (Visual Studio 2017) on the Windows 10 buildbot is just really buggy and miscompiles the ternary if...
Contributor
Author
There was a problem hiding this comment.
Ugh, MSVC miscompiles this up through v19.27 (fixed in v19.28):
zware
approved these changes
Sep 14, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this pull request
Sep 22, 2024
…thon#124085) We need to return immediately if there's an error during dictionary lookup. Also avoid the conditional-if operator. MSVC versions through v19.27 miscompile compound literals with side effects within a conditional operator. This caused crashes in the Windows10 buildbot.
colesbury
commented
Oct 21, 2024
Contributor
Author
There was a problem hiding this comment.
@fiona02 - Please do not post AI-generated PR reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to return immediately if there's an error during dictionary lookup.
Also avoid the conditional-if operator. The Windows 10 buildbot seems to miscompile that for unknown reasons.