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

Panic in dynamic import #1050

Open
bartlomieju opened this issue Jan 20, 2025 · 0 comments
Open

Panic in dynamic import #1050

bartlomieju opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bartlomieju
Copy link
Member

Originally reported in denoland/deno#27736

function bar(v) {
  bar(import(0));
}
bar("foo");

causes panic like so:

thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.330.0/runtime/bindings.rs:700:47:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x10f995386 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hcaf66bc4c0c453df
   1:        0x10e79315b - core::fmt::write::hc9c5f1836b413410
   2:        0x10f95af42 - std::io::Write::write_fmt::h49df280499063c09
   3:        0x10f9980a8 - std::panicking::default_hook::{{closure}}::h52c0b2f44f6107c5
   4:        0x10f997d21 - std::panicking::default_hook::h5a6cf31501c161b2
   5:        0x10e64e661 - deno::setup_panic_hook::{{closure}}::hd20786499ea60ca0
   6:        0x10f9990be - std::panicking::rust_panic_with_hook::hda4640ee332466e9
   7:        0x10f998a52 - std::panicking::begin_panic_handler::{{closure}}::haa3060694b34ea3d
   8:        0x10f9989e9 - std::sys::backtrace::__rust_end_short_backtrace::h8eb44913cfe71457
   9:        0x10f9989dc - _rust_begin_unwind
  10:        0x11149de5a - core::panicking::panic_fmt::h31edc3d6ff0aadca
  11:        0x11149df14 - core::panicking::panic::hfd2e4211468d1768
  12:        0x11149e378 - core::option::unwrap_failed::h5efa68320d76c7d1
  13:        0x10e92cf6d - <F as v8::isolate::HostImportModuleDynamicallyCallback>::to_c_fn::abi_adapter::h457a0d923bedd7cf
  14:        0x110420d31 - __ZN2v88internal25Runtime_DynamicImportCallEiPmPNS0_7IsolateE
@bartlomieju bartlomieju added the bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant