-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-121459: Add missing return to _PyDict_LoadGlobalStackRef #124085
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
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.
!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:
|
if (val == NULL) { | ||
*value_addr = PyStackRef_NULL; | ||
} | ||
else { | ||
*value_addr = PyStackRef_FromPyObjectNew(val); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... I think MSVC 1916 (Visual Studio 2017) on the Windows 10 buildbot is just really buggy and miscompiles the ternary if...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, MSVC miscompiles this up through v19.27 (fixed in v19.28):
…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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fiona02 - Please do not post AI-generated PR reviews.
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.