Repository navigation
Closed
Labels
A-BugSomething isn't workingA-ExecutionIssues or PRs related to code executionC-BuiltinsPRs and Issues related to builtins/intrinsics
Milestone
Description
The OrdinaryDefineOwnProperty() function can panic with the following error message:
thread 'main' panicked at 'Object already borrowed: BorrowMutError', boa/src/object/internal_methods.rs:198:18
This has been observed when running this ECMAScript test.
This is the full backtrace:
0: rust_begin_unwind
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
1: core::panicking::panic_fmt
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
2: core::option::expect_none_failed
at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
3: boa::object::internal_methods::<impl boa::object::gcobject::GcObject>::ordinary_define_own_property
4: boa::object::internal_methods::<impl boa::object::gcobject::GcObject>::set
5: boa::object::internal_methods::<impl boa::object::gcobject::GcObject>::set
6: boa::value::Value::set_field
7: <boa::syntax::ast::node::operator::assign::Assign as boa::exec::Executable>::run
8: <boa::syntax::ast::node::statement_list::StatementList as boa::exec::Executable>::run
9: boa::object::gcobject::GcObject::call
10: boa::object::internal_methods::<impl boa::object::gcobject::GcObject>::get
11: boa::value::Value::get_field
12: boa::object::gcobject::GcObject::to_json
13: boa::value::Value::to_json
14: boa::builtins::json::Json::stringify
15: boa::object::gcobject::GcObject::call
16: <boa::syntax::ast::node::call::Call as boa::exec::Executable>::run
17: <boa::syntax::ast::node::Node as boa::exec::Executable>::run
18: <boa::syntax::ast::node::statement_list::StatementList as boa::exec::Executable>::run
19: boa::context::Context::eval
20: boa_tester::exec::<impl boa_tester::Test>::run_once
21: boa_tester::exec::<impl boa_tester::Test>::run
22: boa_tester::main
It seems that when we call self.insert() here we are re-borrowing the object.
You can check this issue by running the following command:
RUST_BACKTRACE=1 cargo run --release --bin boa_tester -- run -v -s test/built-ins/JSON/stringify/property-order.js
Metadata
Metadata
Assignees
Labels
A-BugSomething isn't workingA-ExecutionIssues or PRs related to code executionC-BuiltinsPRs and Issues related to builtins/intrinsics
Activity