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

DartVM crash: throw null - 2 #1693

Closed
DartBot opened this issue Feb 15, 2012 · 6 comments
Closed

DartVM crash: throw null - 2 #1693

DartBot opened this issue Feb 15, 2012 · 6 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Feb 15, 2012

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

@anders-sandholm
Copy link
Contributor

Added Area-VM, Triaged labels.

@ghost
Copy link

ghost commented Feb 16, 2012

Set owner to @sgmitrovic.
Added Accepted label.

@ghost
Copy link

ghost commented Feb 16, 2012

Fixed in r4303


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Feb 21, 2012

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
main() {
  try {
    throw null;
  } catch (int x) { }
}

should not throw.

@ghost
Copy link

ghost commented Feb 21, 2012

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

@DartBot
Copy link
Author

DartBot commented Feb 22, 2012

This comment was originally written by [email protected]


Filed issue #1789.
Bunch of co19 tests against dart statements will be uploaded in a week or so.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Feb 22, 2012
@DartBot DartBot assigned ghost Feb 22, 2012
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.
Projects
None yet
Development

No branches or pull requests

2 participants