-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
denoland/deno_core
#856Labels
bugSomething isn't working correctlySomething isn't working correctlydeno_coreChanges in "deno_core" crate are neededChanges in "deno_core" crate are needed
Description
Version: Deno 1.45.4
Run this code and Deno will crash...
const AsyncFunction = Object.getPrototypeOf(async function () {
// empty
}).constructor
const func = new AsyncFunction(
`return doesNotExist();
//# sourceURL=empty.eval`
)
func.call({})
...with this output...
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: macos aarch64
Version: 1.45.4
Args: ["deno", "run", "crash.ts"]
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.299.0/error.rs:1245:36:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
To resolve, simply remove the sourceURL
line. Now it'll fail as expected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlydeno_coreChanges in "deno_core" crate are neededChanges in "deno_core" crate are needed