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
mraleph opened this issue
Nov 20, 2020
· 4 comments
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.NNBDIssues related to NNBD ReleaseP0A serious issue requiring immediate resolution
This is not correct in the presence of debugger, which allows pausing on uncaught exceptions and inspecting frames.
You can use the following test:
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file// for details. All rights reserved. Use of this source code is governed by a// BSD-style license that can be found in the LICENSE file.// VMOptions=--deterministic --optimization-counter-threshold=1000import'dart:convert';
import'package:observatory/service_io.dart';
import'package:test/test.dart';
import'test_helper.dart';
import'service_test_common.dart';
classX {
lateString _y;
@pragma('vm:never-inline')
Stringget y => _y;
}
testeeMain() async {
final x =X();
x._y ="";
for (var i =0; i <2000; i++) x.y;
X().y;
}
var tests =<IsolateTest>[
hasStoppedWithUnhandledException,
(Isolate isolate) async {
print("We stopped!");
var stack =await isolate.getStack();
}
];
main(args) =>runIsolateTests(args, tests,
pause_on_unhandled_exceptions:true,
testeeConcurrent: testeeMain,
extraArgs: extraDebuggingArgs);
Save it to runtime/observatory/tests/service/pause_on_exception_from_slow_path_test.dart then do:
The text was updated successfully, but these errors were encountered:
mraleph
added
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
P0
A serious issue requiring immediate resolution
NNBD
Issues related to NNBD Release
labels
Nov 20, 2020
ThrowErrorSlowPathCode is rarely used in JIT mode, so this bug was unnoticed. With null safety it is now used more often - for late fields without initializer and for null check operator.
Also note that it doesn't seem to cause the incorrect behavior without a debugger. Only if you're debugging an application and pause on exception and the exception is thrown for the uninitialized late field or a null value in a null check, then you will hit that bug. So, users debugging applications which were migrated / started using new null safety features may be affected.
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.NNBDIssues related to NNBD ReleaseP0A serious issue requiring immediate resolution
It does the following:
This is not correct in the presence of debugger, which allows pausing on uncaught exceptions and inspecting frames.
You can use the following test:
Save it to
runtime/observatory/tests/service/pause_on_exception_from_slow_path_test.dart
then do:$ tools/test.py -n dartk-weak-asserts-linux-release-x64 service/pause_on_exception_from_slow
The VM would crash instead of pausing. Marking as P0 because it severely impacts usability of NNBD release.
(Reported to me by @tvolkert)
The text was updated successfully, but these errors were encountered: