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

Bug: reliable panic reproduction at random generator usage #26480

Closed
jerome-benoit opened this issue Oct 22, 2024 · 0 comments · Fixed by #26506
Closed

Bug: reliable panic reproduction at random generator usage #26480

jerome-benoit opened this issue Oct 22, 2024 · 0 comments · Fixed by #26506
Assignees
Labels
bug Something isn't working correctly node compat panic

Comments

@jerome-benoit
Copy link
Contributor

jerome-benoit commented Oct 22, 2024

That code https://github.com/jerome-benoit/benchmarks-js/blob/master/random.mjs with deno run -A random.mjs triggers systematically the panic:

Platform: linux x86_64
Version: 2.0.2
Args: ["deno", "run", "-A", "random.mjs"]

thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/src/distributions/uniform.rs:561:1:
Uniform::new called with `low >= high`
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: deno_node::ops::crypto::op_node_random_int::op_node_random_int::v8_fn_ptr_fast
   4: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

The exact code triggering it in the file it is not yet identified.

@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Oct 22, 2024
littledivy added a commit to littledivy/deno_core that referenced this issue Oct 23, 2024
Ref denoland/deno#26480

Matches Rust's `as` cast (used by slow calls)
littledivy added a commit to denoland/deno_core that referenced this issue Oct 24, 2024
Ref denoland/deno#26480

Matches Rust's `as` cast (used by slow calls)
littledivy added a commit to littledivy/deno that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants