-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] Further prevent crashes in legacy mode of isSameExecutor #73813
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
[Concurrency] Further prevent crashes in legacy mode of isSameExecutor #73813
Conversation
5837aa1
to
e559620
Compare
@swift-ci please smoke test |
Repalces #73773 |
This still isn't right I think... doing more investigating and adding more tests for various cases. |
f32a1a2
to
4812a8c
Compare
4812a8c
to
efed449
Compare
if (const char *modeStr = runtime::environment::concurrencyIsCurrentExecutorLegacyModeOverride()) { | ||
if (strcmp(modeStr, "nocrash") == 0 || strcmp(modeStr, "legacy") == 0) { | ||
useLegacyMode = true; | ||
} else if (strcmp(modeStr, "crash") == 0 || strcmp(modeStr, "swift6") == 0) { |
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.
just to make it less confusing in our tests; this is not expected to be used by anyone tbh, but I keep the old mode names.
26a4804
to
410aece
Compare
@swift-ci please smoke test |
// RUN: %empty-directory(%t) | ||
// RUN: %target-build-swift -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library %s -o %t/a.out | ||
// RUN: %target-codesign %t/a.out | ||
// RUN: %env-SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=swift6 %target-run %t/a.out |
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.
note that all the tests now have two SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE versions
410aece
to
bef90eb
Compare
@swift-ci please smoke test |
#if !SWIFT_CONCURRENCY_EMBEDDED | ||
swift::runtime::bincompat:: | ||
return swift::runtime::bincompat:: |
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.
this patch also includes this very important bit; previously this missing return would have rendered the bincompat detection useless.
9bc4849
to
f03c5f2
Compare
@swift-ci please smoke test |
f03c5f2
to
f15da4a
Compare
@swift-ci please smoke test |
Final commit to fix a test on linux/windows, impl remained the same. |
@swift-ci please smoke test |
Ofc whack-a-mole with tests in CI now heh |
@swift-ci please smoke test |
resolves rdar://128425368 resolves rdar://127400013
…ain thread that this is equal
…r swift6/legacy modes
57158d2
to
b90aad2
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
This cleans up interactions with the "legacy mode" where we're not allowed to crash in the
isCurrentExecutor
impl.Also cleans up interactions with the SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL mode.
This PR also makes all tests to run in both the swift6 and legacy modes, so we have a better overview what's expected.
resolves rdar://128425368
resolves rdar://127400013
resolves rdar://128508780
resolves rdar://128508874