You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
thread 'main' panicked at 'malformed Unicode character escape sequence: Utf8Error { valid_up_to: 3, error_len: None }'
To Reproduce
Input: Th"}f\ua/ ڀ
Code:
fnmain(){// let data = inputletmut context = Context::new();
context.eval(data);}
Output
thread 'main' panicked at 'malformed Unicode character escape sequence: Utf8Error { valid_up_to: 3, error_len: None }', /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/lexer/string.rs:159:38
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: std::panicking::rust_panic_with_hook
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: core::result::Result<T,E>::expect
at /home/xsh/code/rust-compiler/src/libcore/result.rs:963
10: boa::syntax::lexer::string::unescape_string
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/lexer/string.rs:158
11: <boa::syntax::lexer::string::StringLiteral as boa::syntax::lexer::Tokenizer<R>>::lex
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/lexer/string.rs:61
12: boa::syntax::lexer::Lexer<R>::next
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/lexer/mod.rs:200
13: boa::syntax::parser::cursor::buffered_lexer::BufferedLexer<R>::fill
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/cursor/buffered_lexer/mod.rs:131
14: boa::syntax::parser::cursor::buffered_lexer::BufferedLexer<R>::peek
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/cursor/buffered_lexer/mod.rs:219
15: boa::syntax::parser::cursor::Cursor<R>::peek
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/cursor/mod.rs:61
16: <boa::syntax::parser::statement::Statement as boa::syntax::parser::TokenParser<R>>::parse
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/statement/mod.rs:184
17: <boa::syntax::parser::statement::StatementListItem as boa::syntax::parser::TokenParser<R>>::parse
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/statement/mod.rs:353
18: <boa::syntax::parser::statement::StatementList as boa::syntax::parser::TokenParser<R>>::parse
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/statement/mod.rs:274
19: <boa::syntax::parser::ScriptBody as boa::syntax::parser::TokenParser<R>>::parse
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/mod.rs:159
20: <boa::syntax::parser::Script as boa::syntax::parser::TokenParser<R>>::parse
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/mod.rs:136
21: boa::syntax::parser::Parser<R>::parse_all
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/parser/mod.rs:105
22: boa::context::Context::eval
at /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/context.rs:712
Expected behavior
eval should return error properly instead of panic
Build environment (please complete the following information):
OS: Ubuntu
Version: 18.04
Target triple: x86_64-unknown-linux-gnu
Rustc version: rustc 1.46.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
thread 'main' panicked at 'malformed Unicode character escape sequence: Utf8Error { valid_up_to: 3, error_len: None }'
To Reproduce
Input:
Th"}f\ua/ ڀ
Code:
Output
Expected behavior
eval should return error properly instead of panic
Build environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: