Issue 1:
Per this convo.

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

run RUST_BACKTRACE=1 deno to open a REPL, then

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.

Issue 2:
Logging a string with an unpaired surrogate unit (console.log("\uDE00")) causes Deno to crash. Similarly, when an object contains such a string, logging it also causes a crash (console.log({x:"\uDE00"}))

Note that alert and Deno.core.print do not crash in this situation

RUST_BACKTRACE=1 deno
Deno 1.14.1
exit using ctrl+d or close()
> console.log("\uDE00")
�
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("lone leading surrogate in hex escape", line: 1, column: 100)', /Users/ry/src/deno/core/inspector.rs:718:52
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: <core::future::from_generator::GenFuture<T> 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: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
14: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.