Skip to content

[region-isolation] Improve async let errors to always use a new style error. #74869

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 3 commits into from
Jul 1, 2024

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Jul 1, 2024

Just doing a go over of some of the diagnostics.

rdar://130915737

gottesmm added 3 commits July 1, 2024 13:12
…n also work with TransferNonSendable versions of the error.

This asserts only option is an option to make it quicker/easier to triage
unknown pattern match errors by aborting when we emit it (allowing one to
immediately drop into the debugger at that point).

Previously, it only happened for errors in RegionAnalysis not in
TransferNonSendable itself.
… not further sent into an actor isolated function to use a new style error.

Just going through and fixing sending errors.

rdar://130915737
…oved cleanup transfernonsendable_asynclet.swift. NFC.
@gottesmm
Copy link
Contributor Author

gottesmm commented Jul 1, 2024

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 1, 2024 22:02
@gottesmm gottesmm merged commit a13c1dc into swiftlang:main Jul 1, 2024
3 checks passed
@gottesmm gottesmm deleted the rdar130915737 branch July 1, 2024 23:46
Comment on lines +31 to +36
#ifndef NDEBUG
/// Global bool set only when asserts are enabled to ease debugging by causing
/// unknown pattern errors to cause an assert so we drop into the debugger.
extern bool AbortOnUnknownPatternMatchError;
#endif

Copy link
Contributor

Choose a reason for hiding this comment

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

The code in TransferNonSendable.cpp that uses AbortOnUnknownPatternMatchError is not guarded by NDEBUG.

if (AbortOnUnknownPatternMatchError) {
llvm::report_fatal_error(
"RegionIsolation: Aborting on unknown pattern match error");
}

if (AbortOnUnknownPatternMatchError) {
llvm::report_fatal_error(
"RegionIsolation: Aborting on unknown pattern match error");
}

if (AbortOnUnknownPatternMatchError) {
llvm::report_fatal_error(
"RegionIsolation: Aborting on unknown pattern match error");
}

if (AbortOnUnknownPatternMatchError) {
llvm::report_fatal_error(
"RegionIsolation: Aborting on unknown pattern match error");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@drodriguez Thanks for the report! I am fixing it here: #74911

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.

2 participants