LibJS: Don't attempt to cast property key to number in PutByIdWithThis
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

Property key for this instruction cannot be a number.
This commit is contained in:
Aliaksandr Kalenik 2025-09-13 19:21:43 +02:00 committed by Andreas Kling
commit 0076ab74b2
Notes: github-actions[bot] 2025-09-13 18:03:34 +00:00

View file

@ -2656,7 +2656,7 @@ ThrowCompletionOr<void> PutByIdWithThis::execute_impl(Bytecode::Interpreter& int
auto& vm = interpreter.vm(); auto& vm = interpreter.vm();
auto value = interpreter.get(m_src); auto value = interpreter.get(m_src);
auto base = interpreter.get(m_base); auto base = interpreter.get(m_base);
PropertyKey name = interpreter.current_executable().get_identifier(m_property); PropertyKey name { interpreter.current_executable().get_identifier(m_property), PropertyKey::StringMayBeNumber::No };
auto& cache = interpreter.current_executable().property_lookup_caches[m_cache_index]; auto& cache = interpreter.current_executable().property_lookup_caches[m_cache_index];
TRY(put_by_property_key(vm, base, interpreter.get(m_this_value), value, {}, name, m_kind, &cache)); TRY(put_by_property_key(vm, base, interpreter.get(m_this_value), value, {}, name, m_kind, &cache));
return {}; return {};