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

finally clause is sometimes executed twice. #11972

Closed
floitschG opened this issue Jul 23, 2013 · 6 comments
Closed

finally clause is sometimes executed twice. #11972

floitschG opened this issue Jul 23, 2013 · 6 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@floitschG
Copy link
Contributor

The finally block is, under special circumstances, executed twice.

The following code (extracted from language/throw8_test.dart) shows some conditions:
===
 try {
    try { // <==== requires nested try.
      return 499; // <=== must return something.
    } catch (e, st) {
      rethrow;
    }
  } finally {
    finallyExecutionCount++; // <== should not be invoked twice.
    throw "quit finally with throw"; // <=== must throw.
  }
===

I'm leaving the priority unassigned, but please consider making this a high priority bug, since it's extremely hard to debug.

@floitschG
Copy link
Contributor Author

Issue #11969 has been merged into this issue.

@floitschG
Copy link
Contributor Author

Issue #12195 has been merged into this issue.


cc @justinfagnani.

@fsc8000
Copy link
Contributor

fsc8000 commented Aug 5, 2013

I'll take a look. There is a bug in the VM compiler.

A similar reproduction with two nested try-finally blocks:

  try {
    try { // <==== requires nested try.
      return 499; // <=== must return something.
    } finally {
      print("inner finally");
    }
  } finally {
    finallyExecutionCount++; // <== should not be invoked twice.
    throw "quit finally with throw"; // <=== must throw.
  }


Set owner to @fsc8000.
Added Accepted label.

@fsc8000
Copy link
Contributor

fsc8000 commented Aug 5, 2013

Removed Priority-Unassigned label.
Added Priority-Uigne label.

@fsc8000
Copy link
Contributor

fsc8000 commented Aug 5, 2013

Removed Priority-Uigne label.
Added Priority-High label.

@fsc8000
Copy link
Contributor

fsc8000 commented Aug 5, 2013

Fixed in r25767.


Added Fixed label.

@floitschG floitschG added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Aug 5, 2013
This issue was closed.
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. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

2 participants