Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commented Sep 14, 2024

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.

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.
@colesbury
Copy link
ContributorAuthor

!buildbot AMD64 Windows10

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @colesbury for commit c8c59a1 🤖

The command will test the builders whose names match following regular expression: AMD64 Windows10

The builders matched are:

  • AMD64 Windows10 PR

Comment on lines +1553 to +1558
if (val==NULL){
*value_addr=PyStackRef_NULL;
}
else{
*value_addr=PyStackRef_FromPyObjectNew(val);
}
Copy link
ContributorAuthor

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...

Copy link
ContributorAuthor

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):

https://gcc.godbolt.org/z/ezr9rsvM4

@colesburycolesbury merged commit 401fff7 into python:mainSep 14, 2024
@colesburycolesbury deleted the gh-121459-missing-return branch September 14, 2024 18:29
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.
Copy link
ContributorAuthor

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.

Sign up for freeto 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.

3 participants

@colesbury@bedevere-bot@zware