You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DartBot opened this issue
Mar 12, 2015
· 1 comment
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P1A high priority bug; for example, a single project is unusable or has many test failures
test(b) {
try {
for (int i = 0; i < 10; i++) {
// Closurizing i and b, thus the return statement
// executes at context level 2, and the code in
// the finally block runs at context level 1.
return () => i + b;
}
} finally {
b = 10;
}
}
main() {
var c = test(0);
}
The VM falsely restores the context to the saved try_context before executing the inlined assignment to b. Thus, accessing b accesses a non-existing context and the VM crashes.
Fix is on its way.
The text was updated successfully, but these errors were encountered:
DartBot
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
Mar 13, 2015
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P1A high priority bug; for example, a single project is unusable or has many test failures
This issue was originally filed by @mhausner
This simple program crashes
test(b) {
try {
for (int i = 0; i < 10; i++) {
// Closurizing i and b, thus the return statement
// executes at context level 2, and the code in
// the finally block runs at context level 1.
return () => i + b;
}
} finally {
b = 10;
}
}
main() {
var c = test(0);
}
The VM falsely restores the context to the saved try_context before executing the inlined assignment to b. Thus, accessing b accesses a non-existing context and the VM crashes.
Fix is on its way.
The text was updated successfully, but these errors were encountered: