Skip to content
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

[vm] VM fails new test language/sync_star/sync_star_exception_iterator_test.dart #52083

Closed
rakudrama opened this issue Apr 18, 2023 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@rakudrama
Copy link
Member

bfd71ad add the test language/sync_star/sync_star_exception_iterator_test.dart.

This test is that an exception thrown by something.iterator should be caught here:

try {
  yield* something;
} catch (e) {
  // here
}

This test fails on the VM.

The test also failed on dart2js. It was fixed by calling a helper to add the yield* operand to the _SyncStarIterator. Perhaps something similar would work for the VM runtime.

This is a bug discovered while fixing another dart2js bug, and not something reported by a customer.

/cc @osa1

@rakudrama rakudrama added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Apr 18, 2023
@alexmarkov alexmarkov self-assigned this Apr 18, 2023
osa1 added a commit to osa1/sdk that referenced this issue May 16, 2024
dart2wasm's sync* runtime library was mostly copied from VM, but we
didn't get the fix for dart-lang#52083 in 9cf26fc. This ports the fix to
dart2wasm.
copybara-service bot pushed a commit that referenced this issue May 16, 2024
dart2wasm's sync* runtime library was mostly copied from VM, but we
didn't get the fix for #52083 in 9cf26fc. This ports the fix to
dart2wasm.

This currently doesn't fix any tests as there are other issues with
dart2wasm's sync* implementation, which we are fixing in
https://dart-review.googlesource.com/c/sdk/+/366663.

Change-Id: I9d82d1bbb4c96ccb9bf411a385f4b7ff395a1c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366671
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
copybara-service bot pushed a commit that referenced this issue May 29, 2024
This cherry-picks commits:

6de879e - [dart2wasm] Fix exception handling in async functions
7e237a1 - [dart2wasm] Small refactoring in async code generator
eabb2b3 - [dart2wasm] Catch JS exceptions in async functions
e44bc22 - [dart2wasm] Fix bug in restoration of `this` in async functions.
350954a - [dart2wasm] Fix `this` restoration code in sync* handling.
8ccb412 - [dart2wasm] Move type parameter bounds checks & parameter type check logic together with logic setting up variables
e7dde83 - [dart2wasm] Port VM fix for #52083 (sync*)
3863e78 - [dart2wasm] Move yield finder to a shared library
829261e - [dart2wasm] Move async compiler utilities to state_machine library
fab56db - [dart2wasm] Move common code generation routines to state_machine, fix sync*

Bugs: #55347, #55457, #51343, #51342
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/368300
Cherry-pick-request: #55847
Change-Id: I0a4186533fbdf4c5727911295ad48696a90f715f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368300
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

2 participants