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 panics when console.log(String.fromCharCode(55296)) is run in REPL #14257

Closed
jed opened this issue Apr 11, 2022 · 4 comments
Closed

Deno panics when console.log(String.fromCharCode(55296)) is run in REPL #14257

jed opened this issue Apr 11, 2022 · 4 comments

Comments

@jed
Copy link

jed commented Apr 11, 2022

Per this convo.

When I perform the following (on macos x86_64 v1.20.4),

  1. run RUST_BACKTRACE=1 deno to open a REPL, then
  2. enter console.log(String.fromCharCode(55296)) and press enter

deno panics and outputs the following backtrace:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected end of hex escape", line: 1, column: 101)', /private/tmp/deno-20220406-92106-p4p5kp/deno/core/inspector.rs:724:66
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: core::result::Result<T,E>::unwrap
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   5: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  11: deno::tools::repl::run::{{closure}}
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  13: deno::main::{{closure}}
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  15: deno_runtime::tokio_util::run_basic
  16: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

According to other folks on Discord, the same behavior happens for other architectures.

@bartlomieju
Copy link
Member

Turns out it's a duplicate of #12226

@lucacasonato
Copy link
Member

It turns out it's actually not exactly a duplicate of #12226, although they are related. This one can be fixed with a lot less effort than #12226 though. PR is incoming!

@rotu
Copy link
Contributor

rotu commented Apr 12, 2022

How is this not an exact duplicate?

@lucacasonato
Copy link
Member

@rotu you're right. It's an exact duplicate. I confused #12226 with another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants