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 'Failed to parse float after checks: ParseFloatError { kind: Invalid }'
To Reproduce
Input: {eZa$*${eZa$*${e74n|44|444,446444444444444444.6444444444446444444444644444444464444444444444444444444444444444444444444444444444444444444444444444444444444444444444444644444464464444444444444464444444446444444444444444444444444444444444444446444444
Code:
fnmain(){// let data = inputletmut context = Context::new();
context.eval(data);}
Output
thread 'main' panicked at 'Failed to parse float after checks: ParseFloatError { kind: Invalid }', /home/xsh/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/Boa-0.11.0/src/syntax/lexer/number.rs:384:50
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::number::NumberLiteral 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/number.rs:384
11: 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:250
12: 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:134
13: 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
14: 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
15: <boa::syntax::parser::expression::assignment::AssignmentExpression 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/expression/assignment/mod.rs:86
16: <boa::syntax::parser::expression::Expression 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/expression/mod.rs:90
17: <boa::syntax::parser::expression::primary::template::TemplateLiteral 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/expression/primary/template/mod.rs:68
18: <boa::syntax::parser::expression::primary::PrimaryExpression 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/expression/primary/mod.rs:141
19: <boa::syntax::parser::expression::left_hand_side::member::MemberExpression 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/expression/left_hand_side/member.rs:77
20: <boa::syntax::parser::expression::left_hand_side::LeftHandSideExpression 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/expression/left_hand_side/mod.rs:67
21: <boa::syntax::parser::expression::update::UpdateExpression 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/expression/update.rs:79
22: <boa::syntax::parser::expression::assignment::exponentiation::ExponentiationExpression 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/expression/assignment/exponentiation.rs:91
23: <boa::syntax::parser::expression::MultiplicativeExpression 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/expression/mod.rs:90
24: <boa::syntax::parser::expression::AdditiveExpression 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/expression/mod.rs:82
25: <boa::syntax::parser::expression::ShiftExpression 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/expression/mod.rs:82
26: <boa::syntax::parser::expression::RelationalExpression 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/expression/mod.rs:489
27: <boa::syntax::parser::expression::EqualityExpression 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/expression/mod.rs:82
28: <boa::syntax::parser::expression::BitwiseANDExpression 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/expression/mod.rs:82
29: <boa::syntax::parser::expression::BitwiseXORExpression 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/expression/mod.rs:82
30: <boa::syntax::parser::expression::BitwiseORExpression 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/expression/mod.rs:82
31: <boa::syntax::parser::expression::ShortCircuitExpression 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/expression/mod.rs:218
32: <boa::syntax::parser::expression::assignment::conditional::ConditionalExpression 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/expression/assignment/conditional.rs:68
33: <boa::syntax::parser::expression::assignment::AssignmentExpression 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/expression/assignment/mod.rs:175
34: <boa::syntax::parser::expression::Expression 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/expression/mod.rs:82
35: <boa::syntax::parser::expression::primary::template::TemplateLiteral 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/expression/primary/template/mod.rs:68
36: <boa::syntax::parser::expression::primary::PrimaryExpression 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/expression/primary/mod.rs:141
37: <boa::syntax::parser::expression::left_hand_side::member::MemberExpression 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/expression/left_hand_side/member.rs:77
38: <boa::syntax::parser::expression::left_hand_side::LeftHandSideExpression 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/expression/left_hand_side/mod.rs:67
39: <boa::syntax::parser::expression::update::UpdateExpression 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/expression/update.rs:79
40: <boa::syntax::parser::expression::assignment::exponentiation::ExponentiationExpression 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/expression/assignment/exponentiation.rs:91
41: <boa::syntax::parser::expression::MultiplicativeExpression 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/expression/mod.rs:90
42: <boa::syntax::parser::expression::AdditiveExpression 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/expression/mod.rs:82
43: <boa::syntax::parser::expression::ShiftExpression 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/expression/mod.rs:82
44: <boa::syntax::parser::expression::RelationalExpression 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/expression/mod.rs:489
45: <boa::syntax::parser::expression::EqualityExpression 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/expression/mod.rs:82
46: <boa::syntax::parser::expression::BitwiseANDExpression 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/expression/mod.rs:82
47: <boa::syntax::parser::expression::BitwiseXORExpression 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/expression/mod.rs:82
48: <boa::syntax::parser::expression::BitwiseORExpression 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/expression/mod.rs:82
49: <boa::syntax::parser::expression::ShortCircuitExpression 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/expression/mod.rs:218
50: <boa::syntax::parser::expression::assignment::conditional::ConditionalExpression 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/expression/assignment/conditional.rs:68
51: <boa::syntax::parser::expression::assignment::AssignmentExpression 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/expression/assignment/mod.rs:175
52: <boa::syntax::parser::expression::Expression 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/expression/mod.rs:82
53: <boa::syntax::parser::statement::expression::ExpressionStatement 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/expression/mod.rs:46
54: <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:200
55: <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
56: <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
57: <boa::syntax::parser::statement::block::Block 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/block/mod.rs:84
58: <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:177
59: <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
60: <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
61: <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
62: <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
63: 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
64: 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
The text was updated successfully, but these errors were encountered:
Do you know if this is still an issue? boa-cli, which also uses Context.eval, fails to reproduce this. It just says Uncaught "SyntaxError": "abrupt end". Perhaps this has been fixed (probably by #1110)? Also, if not, is there a simpler string that causes the same issue?
Describe the bug
thread 'main' panicked at 'Failed to parse float after checks: ParseFloatError { kind: Invalid }'
To Reproduce
${eZa$ *
Input:
{eZa$*
${e74n|44|444,446444444444444444.6444444444446444444444644444444464444444444444444444444444444444444444444444444444444444444444444444444444444444444444444644444464464444444444444464444444446444444444444444444444444444444444444446444444
Code:
Output
Expected behavior
eval should return error properly instead of panic
Build environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: