-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
DartVM crash: throw null - 2 #1693
Comments
Set owner to @sgmitrovic. |
Fixed in r4303 Added Fixed label. |
This comment was originally written by [email protected] The VM behavior is still wrong, since the spec says: "A catch clause of one of the forms catch (T1 p1, T2 p2) s or catch (T1 p1,p2) s matches an object o if o is null or if the type of o is a subtype of T1." So, the test should not throw. |
That is a different type of failure. Please file a separate bug and add a test in future. I have fixed the issue for VM, added a test and will file a bug against frog and leg |
This comment was originally written by [email protected] Filed issue #1789. |
This issue was originally filed by [email protected]
This is a duplicate of the issue #5, the problem is still reproducible for me
What steps will reproduce the problem?
Run the following test:
main() {
try {
throw null;
} catch (int x) { }
}
What is the expected output? What do you see instead?
Expected: test passes
Actual:
runtime/vm/exceptions.cc:110: error: expected: !exception.IsNull()
What version of the product are you using? On what operating system?
DartVM r4248, both checked and unchecked mode
Please provide any additional information below.
(gdb) run test.dart
Starting program: [...]/dart/out/Debug_ia32/dart test.dart
[Thread debugging using libthread_db enabled]
runtime/vm/exceptions.cc:128: error: expected: !exception.IsNull()
Program received signal SIGABRT, Aborted.
0x0012e416 in __kernel_vsyscall ()
(gdb) bt
0 0x0012e416 in __kernel_vsyscall ()
1 0x003f8941 in raise () from /lib/libc.so.6
2 0x003fbe42 in abort () from /lib/libc.so.6
3 0x0807ca7c in dart::DynamicAssertionHelper::Fail (this=0xbfffe394, format=0x825cc90 "expected: %s") at runtime/platform/assert.cc:41
4 0x08096585 in dart::Exceptions::ReThrow (exception=..., stacktrace=...) at runtime/vm/exceptions.cc:128
5 0x0812d295 in dart::DRT_HelperReThrow (isolate=0x8297530, arguments=...) at runtime/vm/code_generator.cc:362
6 0x0812d177 in dart::DRT_ReThrow (arguments=...) at runtime/vm/code_generator.cc:358
7 0xb5f00052 in ?? ()
8 0xb3a007ab in ?? ()
9 0xb3a0006d in ?? ()
10 0x0808a8bb in dart::DartEntry::InvokeStatic (function=..., arguments=..., optional_arguments_names=...) at runtime/vm/dart_entry.cc:88
11 0x0805c492 in dart::Dart_InvokeStatic (library_in=0x8298f50, class_name_in=0x8298f58, function_name_in=0x8298f54, number_of_arguments=0, arguments=0x0)
at runtime/vm/dart_api_impl.cc:2010
12 0x0804c495 in main (argc=2, argv=0xbffff3c4) at runtime/bin/main.cc:590
The text was updated successfully, but these errors were encountered: