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

Deno panic due to call Option::unwrap() on a None value #27736

Closed
vdata1 opened this issue Jan 20, 2025 · 0 comments · Fixed by #27825
Closed

Deno panic due to call Option::unwrap() on a None value #27736

vdata1 opened this issue Jan 20, 2025 · 0 comments · Fixed by #27825
Labels
deno_core Changes in "deno_core" crate are needed panic

Comments

@vdata1
Copy link

vdata1 commented Jan 20, 2025

Hi,

I would like to report a deno panic due to None value used with Option::unwrap().

Version: Deno v2.1.5

You can reproduce the deno panic by simply running the following code snippet.

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

Deno output

Platform: macos x86_64
Version: 2.1.5
Args: ["deno", "run", "-A", "/Users/vdata/Desktop/CISPA_projects/node-deno-bun/interestingCases/test.js"]

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

Regards,
AH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno_core Changes in "deno_core" crate are needed panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants