Skip to content

Add a workaround for Windows ARM64 miscompile #816

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

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

hjyamauchi
Copy link
Contributor

We get libdispatch assert failures with Windows ARM64 release mode in an internal app. We suspect that it is due to Clang miscompile. This is a temporary workaround to avoid them.

We get libdispatch assert failures with Windows ARM64 release mode in
an internal app. We suspect that it is due to Clang miscompile. This
is a temporary workaround to avoid them.
@hjyamauchi
Copy link
Contributor Author

@compnerd

@compnerd
Copy link
Member

@swift-ci please test

elseif (FLAGS MATCHES "2$")
set(FLAGS "/Od;/Og;/Oi;/Oy;/Ob2;/GF;/Gy")
endif()
set_source_files_properties(queue.c PROPERTIES COMPILE_OPTIONS "${FLAGS}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do this through #pragma's that disable optimizations in the source file instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could but the pragma just disables all optimizations and cannot selectively choose the opt flags (though it'd allow to narrow down by functions.) Pros and cons, but I think this is preferred as it doesn't disable all the optimizations.

@hjyamauchi
Copy link
Contributor Author

@compnerd can you rerun the windows CI? I think it's flaky based on the history https://ci-external.swift.org/job/swift-corelibs-libdispatch-PR-windows/

@compnerd
Copy link
Member

@swift-ci please test Windows platform

2 similar comments
@compnerd
Copy link
Member

@swift-ci please test Windows platform

@compnerd
Copy link
Member

@swift-ci please test Windows platform

@hjyamauchi
Copy link
Contributor Author

@compnerd Can you retrigger the Win CI?

@compnerd
Copy link
Member

@swift-ci please test Windows platform

endif()
set_source_files_properties(queue.c PROPERTIES COMPILE_OPTIONS "${FLAGS}")
endif()
endif()
Copy link
Member

Choose a reason for hiding this comment

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

Wow, this is ... ugly. I can't think of a better way to write this though.

@compnerd compnerd merged commit 3a566c9 into swiftlang:main Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants