[api] Canonicalize hole-NaN in DictionaryTemplateInfo::NewInstance

When reusing a cached Map with double representation in
DictionaryTemplateInfo::NewInstance, ensure that incoming float64 values
matching the kHoleNanInt64 bit pattern are canonicalized to quiet NaN
before being stored into the fresh HeapNumber.

Const double fields in V8 must never contain kHoleNanInt64, as that
pattern serves as the uninitialized field sentinel (is_the_hole()).
Storing an uncanonicalized hole-NaN value allows subsequent field stores
to be mistaken for initializing stores, violating constant tracking and
bypassing deoptimization.

TAG=agy
CONV=df226a09-a1a8-4333-80b4-d95312eb98eb

Fixed: 545008200
Change-Id: Ie90c72a71c96e7bcbbddd2608f426ce12eeca370
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8261258
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#109441}
2 files changed
tree: 6779449e29567c908c0ca2328e8548e3dd7f373f
  1. .github/
  2. agents/
  3. bazel/
  4. build_overrides/
  5. custom_deps/
  6. docs/
  7. gni/
  8. include/
  9. infra/
  10. samples/
  11. src/
  12. test/
  13. testing/
  14. third_party/
  15. tools/
  16. .bazelrc
  17. .clang-format
  18. .clang-tidy
  19. .editorconfig
  20. .flake8
  21. .git-blame-ignore-revs
  22. .gitattributes
  23. .gitignore
  24. .gn
  25. .mailmap
  26. .style.yapf
  27. .vpython3
  28. .ycm_extra_conf.py
  29. AUTHORS
  30. BUILD.bazel
  31. BUILD.gn
  32. CODE_OF_CONDUCT.md
  33. codereview.settings
  34. COMMON_OWNERS
  35. DEPS
  36. DIR_METADATA
  37. ENG_REVIEW_OWNERS
  38. INFRA_OWNERS
  39. INTL_OWNERS
  40. LICENSE
  41. LICENSE.fdlibm
  42. LICENSE.strongtalk
  43. LICENSE.v8
  44. LOONG_OWNERS
  45. MIPS_OWNERS
  46. MODULE.bazel
  47. OWNERS
  48. PPC_OWNERS
  49. PRESUBMIT.py
  50. pyrightconfig.json
  51. README.md
  52. RISCV_OWNERS
  53. S390_OWNERS
  54. SECURITY.md
  55. WATCHLISTS
README.md

V8 JavaScript Engine

V8 is Google's open source JavaScript engine.

V8 implements ECMAScript as specified in ECMA-262.

V8 is written in C++ and is used in Chromium, the open source browser from Google.

V8 can run standalone, or can be embedded into any C++ application.

V8 Project page: https://v8.dev/docs

Getting the Code

Checkout depot tools, and run

    fetch v8

This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run

    git pull origin
    gclient sync

For fetching all branches, add the following into your remote configuration in .git/config:

    fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
    fetch = +refs/tags/*:refs/tags/*

Contributing

Please follow the instructions mentioned at v8.dev/docs/contribute.