Skip to content

add @getInternalField and @putInternalField - #10

Merged
Jarred-Sumner merged 2 commits into
mainfrom
internal-field
Jul 11, 2023
Merged

Jarred-Sumner merged 2 commits into
mainfrom
internal-field

Conversation

@small-angel

Copy link
Copy Markdown

two new bytecode builtin functions

@Jarred-Sumner
Jarred-Sumner merged commit dcaa801 into main Jul 11, 2023
@Jarred-Sumner
Jarred-Sumner deleted the internal-field branch July 11, 2023 23:46
springmin pushed a commit to springmin/WebKit that referenced this pull request Aug 3, 2026
… compile

https://bugs.webkit.org/show_bug.cgi?id=320132
rdar://183070350

Reviewed by Marcus Plutowski.

LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table64.wast.js
test oven-sh#10 and oven-sh#33 are failing because modules with tables with initial sizes
larger than Wasm::maxTableEntries fail to compile.

To fix this, I removed the compile-time check that is causing the failure.
Once the check is gone, the uint64_t initial is silently narrowed when
constructing TableInformation, so a value could overflow a uint32_t and wrap to a
small, valid-looking length.

Instead of rejecting a large initial at parse time, clamp the value to
maxTableEntries when narrowing it to the stored uint32_t. Out-of-range
declarations therefore stay out of range and are still rejected by
Table::tryCreate() at instantiation.

* JSTests/wasm/stress/table64-initial-truncation.js: Added.
(leb128):
(moduleBytesWithTableInitial):
* LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table64.wast.js-expected.txt:
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseTableHelper):

Canonical link: https://commits.webkit.org/317888@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants