Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stringconsts #1

Closed
wants to merge 553 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
553 commits
Select commit Hold shift + click to select a range
4e4cb62
[jspi] Fix invalid wat in test case. (#6559)
brendandahl Apr 29, 2024
63d308f
[Strings] Work around ref.cast not working on string views, and add f…
kripken Apr 29, 2024
dcc5b7b
Re-enable fuzzing of text round trips (#6560)
tlively Apr 29, 2024
be001f7
[Parser] Re-use blocks instead of wrapping where possible (#6552)
tlively Apr 29, 2024
85a8600
Use the new wat parser in tests (#6556)
tlively Apr 29, 2024
8c99af0
[Strings] wasm-ctor-eval: Stop on seeing a string view, which we cann…
kripken Apr 29, 2024
497ffe2
[Strings] Limit string allocations like we do arrays (#6562)
kripken Apr 29, 2024
049ff7a
J2CLOpts: Add "precompute" and "remove-unused-brs" as additional cleanup
rluble Apr 30, 2024
7d9e4a8
[StackIR] Support source maps and DWARF with StackIR (#6564)
kripken May 1, 2024
58753f4
Respect the Web limitation on Table size (#6567)
kripken May 1, 2024
d58c546
Source map fixes (#6550)
vouillon May 2, 2024
4b7c610
Allow DWARF and multivalue together (#6570)
aheejin May 6, 2024
ed2cec4
wasm-split: Handle RefFuncs (#6513)
kripken May 8, 2024
a288a73
Fuzzer: Stop emitting nullable stringviews (#6574)
kripken May 8, 2024
712ad9d
Fix CFGWalker issue in single-threaded mode (#6573)
XMadrid May 9, 2024
a816627
[J2Cl] Make J2clOpts more effective with transitive deps in constant …
rluble May 9, 2024
006181b
[validator] Remove indexType helper function (#6576)
sbc100 May 9, 2024
7b2e019
[StackIR] Run StackIR during binary writing and not as a pass (#6568)
kripken May 9, 2024
1cc1501
Fuzzer: Add another stringview subtyping error message to ignore (#6575)
kripken May 9, 2024
9975b56
Fix running just a single spec test via `check.py spec --spec-test fo…
sbc100 May 10, 2024
abc430b
[memory64] Add table64 to existing memory64 support (#6577)
sbc100 May 10, 2024
5b46a5b
[interp] Make memory and table handling more consistency. NFC (#6582)
sbc100 May 13, 2024
924533f
[Parser] Parse wast scripts (#6581)
tlively May 13, 2024
020d08e
Simplify scratch local calculation (#6583)
tlively May 14, 2024
4ca05f7
LocalCSE: Check effects/generativity early (#6587)
kripken May 14, 2024
76a2c64
LocalCSE: Ignore traps of code in between (#6588)
kripken May 14, 2024
55f33b5
[NFC] Add printing for EffectAnalyzer (#6586)
kripken May 14, 2024
140386e
Source maps: Allow specifying that an expression has no debug info in…
vouillon May 14, 2024
940f457
Remove redundant ptrType from MemorySize/Grow instructions. NFC (#6590)
sbc100 May 15, 2024
8a5dc18
LocalCSE: Fix regression from #6587 by accumulating generativity (#6591)
kripken May 15, 2024
ef4b57c
[Strings] Remove stringview types and instructions (#6579)
tlively May 15, 2024
6b43a5e
[Strings] Remove operations not included in imported strings (#6589)
tlively May 15, 2024
b70d8df
Debug location parser: accept arbitrary paths (#6594)
vouillon May 15, 2024
ae94994
[EH] Rename option/pass names for new EH (exnref) (#6592)
aheejin May 15, 2024
2cc5e06
OptimizeInstructions: Add missing invalidation check in consecutive e…
kripken May 15, 2024
2b60f8a
Add table64 lowering pass (#6595)
sbc100 May 15, 2024
268feb9
[NFC] Disable a warning that happens on system headers on CI (#6597)
kripken May 15, 2024
e5f2edf
Fix binary emitting of br_if with a refined value by emitting a cast …
kripken May 16, 2024
85f677a
Fix FlatTable for table64 (#6598)
sbc100 May 16, 2024
fab6649
[Table64Lowering] Don't assume that all segments are from 64-bit tabl…
sbc100 May 16, 2024
669bc06
[Memory64Lowering/Table64Lowering] Avoid dependency in visitation ord…
sbc100 May 16, 2024
f4a83dd
[cmake] Remove redundant `binaryen_emscripten_SOURCES` (#6602)
sbc100 May 17, 2024
4e9f495
Fix GlobalRefining's handling of gets in module code and add missing …
kripken May 17, 2024
369cddf
Fix generate-dyncalls and directize passed under table64 (#6604)
sbc100 May 18, 2024
921644c
Rewrite wasm-shell to use new wast parser (#6601)
tlively May 18, 2024
5d64afa
Fix an unintentional list item in README.md (#6609)
elliottt May 20, 2024
3e33605
SimplifyGlobals: Do not switch a get to use a global of another type …
kripken May 20, 2024
5999c99
[table64] Preserve 64-bit table flag when writing binaries (#6610)
sbc100 May 20, 2024
326bfcd
Fuzzer: Better fuzzing of globals (#6611)
kripken May 21, 2024
772e572
Fix TableFill bounds checking (#6621)
kripken May 21, 2024
06cbe01
[NFC] Fix unused variable warning (#6624)
walkingeyerobot May 22, 2024
9b61eb3
Fix fuzzer generation of a DataSegment + add validation that would ha…
kripken May 23, 2024
f9ce00b
Fuzzer: Stop testing with TurboFan as Turboshaft is rolling out and i…
kripken May 28, 2024
13f3fd2
[EH] Rename old EH tests from -old to -legacy (#6627)
aheejin May 28, 2024
fc48efe
OptimizeInstructions: Push StructNew down to help it fold away Struct…
rluble May 28, 2024
525f076
Run RemoveUnneededModuleElements early (#6620)
kripken May 29, 2024
f622b8e
Use new wast parser in wasm2js (#6606)
tlively May 29, 2024
d844d2e
Remove obsolete parser code (#6607)
tlively May 29, 2024
56fe062
[NFC] Save a line in wasm-shell.cpp (#6631)
tlively May 29, 2024
b85197c
SignaturePruning: Properly handle public types (#6630)
kripken May 29, 2024
5d90167
Fix Vacuuming of code leading up to an infinite loop (#6632)
kripken May 29, 2024
0148db0
[NFC] Port LogExecution test to lit (#6634)
kripken May 30, 2024
18bb1f5
Avoid duplicate type names (#6633)
kripken May 30, 2024
0c23394
LogExecution: Optionally take a module name for the logger function (…
yamt May 31, 2024
f8086ad
Optimize ReorderGlobals ordering with a new algorithm (#6625)
kripken May 31, 2024
1f2cd4f
Make Emscripten CMake build more configurable (#6638)
dschuff May 31, 2024
9347a22
Fix binary parser of declarative element segments (#6618)
tanishiking Jun 3, 2024
ea4d9e4
Effects: Add missing combining logic for MayNotReturn (#6635)
kripken Jun 3, 2024
76d1ac3
Fix stack-use-after-scope on Windows in Precompute (#6643)
mtb0x1 Jun 5, 2024
0a1a59a
wasm2js: Add basic reference operations (#6648)
kripken Jun 10, 2024
3d0e687
[Strings] Keep public and private types separate in StringLowering (#…
kripken Jun 10, 2024
cdd94a0
Fix scratch local optimizations when emitting string slice (#6649)
tlively Jun 11, 2024
2dcf670
wasm2js: Add Table operations (#6650)
kripken Jun 11, 2024
425ecc6
Fix wasm-split bug in absence of active element segments (#6651)
tlively Jun 11, 2024
475841d
[Parser][NFC] Split parser into multiple compilation units (#6653)
tlively Jun 12, 2024
ac21c8c
[DebugInfo] Copy debug info in call-utils.h (#6652)
kripken Jun 12, 2024
0e11876
[threads] Parse, build, and print shared composite types (#6654)
tlively Jun 12, 2024
3468619
wasm2js: Fix null handling and RefAsNonNull (#6656)
kripken Jun 12, 2024
66610d8
Add local.set/tee local type annotations to BINARYEN_PRINT_FULL (#6657)
kripken Jun 13, 2024
000fa2a
wasm2js: Generalize global initializer code to use the main codegen l…
kripken Jun 13, 2024
0fa99fb
[threads] Add a "shared-everything" feature (#6658)
tlively Jun 14, 2024
027128d
[NFC] Add constexpr HeapTypes for basic heap types (#6662)
tlively Jun 14, 2024
eacea80
[Parser][NFC] Make typeidx and maybeTypeidx return consistent types (…
tlively Jun 14, 2024
881fe6a
[threads] Binary reading and writing of shared composite types (#6664)
tlively Jun 14, 2024
2c758c5
[Parser] Update requirements for implicit type uses (#6665)
tlively Jun 14, 2024
cf2725b
[Parser] Fix error message on required reftype (#6666)
tlively Jun 14, 2024
d849a43
Enable more spec tests (#6669)
tlively Jun 17, 2024
1dd0520
wasm2js: Support arbitrary temp variable types (#6661)
kripken Jun 17, 2024
b377b6f
Fix DataSegment name handling (#6673)
kripken Jun 17, 2024
0f9f2dc
GlobalStructInference: Optimize globals too (#6674)
kripken Jun 17, 2024
c3b9cde
Reject invalid section IDs (#6675)
tlively Jun 18, 2024
408bc7f
fix(#6671): fix possible stack buffer overflow in gen-s-parser.inc (#…
mtb0x1 Jun 18, 2024
829e228
[Parser] Fix bug in unreachable fallback logic (#6676)
tlively Jun 19, 2024
2df678e
[threads] Shared basic heap types (#6667)
tlively Jun 19, 2024
02c4c3c
Re-enable binary.wast spec test (#6677)
tlively Jun 19, 2024
eceb0fb
Check malformed mutability on imported globals (#6679)
tlively Jun 19, 2024
3acacac
Fix validation of unused LEB128 bits (#6680)
tlively Jun 19, 2024
765c614
Validate that names are valid UTF-8 (#6682)
tlively Jun 19, 2024
98da69f
[NFC] Add pragma to ignore maybe-uninitialized in strings.cpp (#6686)
tlively Jun 20, 2024
45f6bdd
Validate memarg offsets (#6683)
tlively Jun 20, 2024
1079a9e
Re-enable spec tests requiring multivalue (#6684)
tlively Jun 20, 2024
c3089b3
GlobalStructInference: Un-nest struct.news in globals when that is he…
kripken Jun 20, 2024
0262515
wasm2js: Fix the names of temp vars with named reference types (#6689)
kripken Jun 21, 2024
a27d952
Add TraceCalls pass (#6619)
loganek Jun 21, 2024
ed35193
Add a proper error for bad select results (#6697)
kripken Jun 24, 2024
78b3c40
[WasmGC] Add missing ArrayNew variants to Properties::isGenerative (#…
kripken Jun 24, 2024
4e07d86
[NFC] Remove a minor compile-time optimization in Heap2Local (#6699)
kripken Jun 25, 2024
a9f6bc0
Add a missing binary reading check for BrOn's reference child's type …
kripken Jun 25, 2024
0a0ee6f
Add missing struct/array type checks in binary reader (#6701)
kripken Jun 25, 2024
4cd8b61
[threads] Validate shared-to-unshared edges in heap types (#6698)
tlively Jun 25, 2024
654ee6e
[threads] Validate shared-polymorphic instructions (#6702)
tlively Jun 25, 2024
d6b4f01
[WasmGC] Heap2Local: Optimize RefEq (#6703)
kripken Jun 26, 2024
ff8095d
[threads] Fuzz shared types in type fuzzer (#6704)
tlively Jun 26, 2024
636d1b2
[threads] Ignore shared-array.wast in fuzzer initial contents (#6706)
tlively Jun 26, 2024
53712b6
[NFC] Add HeapType::getFeatures() (#6707)
kripken Jun 27, 2024
cdf8139
ConstantFieldPropagation: Add a variation that picks between 2 values…
kripken Jun 27, 2024
9792f2c
[DebugInfo] Add debug info to the values emitted in GlobalStructInfer…
kripken Jul 2, 2024
81f8f77
Rename external conversion instructions (#6716)
vouillon Jul 8, 2024
4179603
Version 118 (#6720)
kripken Jul 8, 2024
e93babc
StackIR: Optimize away a drop before an unreachable (#6719)
kripken Jul 8, 2024
081f28b
[tests] Remove use of CHECK-SAME (#6717)
AntonLydike Jul 9, 2024
0750bdb
[C API] Add APIs for getting/setting function types, and a CallRef ex…
kripken Jul 9, 2024
76f6612
Allow --keepfuncs and --splitfuncs to be use alongside a profile data…
Mintyboi Jul 10, 2024
37a86d5
[StackIR] Allow StackIR to be disabled from the commandline (#6725)
kripken Jul 10, 2024
e05f762
[WasmGC] Heap2Local: Optimize RefIs and RefTest (#6705)
kripken Jul 11, 2024
5a1daf7
Monomorphization: Optimize constants (#6711)
kripken Jul 11, 2024
5613981
Heap2Local: Drop RefEq's two arms (#6729)
kripken Jul 11, 2024
020e6cc
[WasmGC] Heap2Local: Optimize RefCast failures (#6727)
kripken Jul 11, 2024
c64ac5d
[wasm-split] Use a fresh table when reference types are enabled (#6726)
tlively Jul 11, 2024
ae4800b
[threads] Shared polymorphism for extern conversions (#6730)
tlively Jul 11, 2024
6d2f101
Monomorphize: Use -O3 over -O1 + tweaks (#6732)
kripken Jul 11, 2024
363edc7
Convert memory64 lowering test to lit. NFC (#6731)
sbc100 Jul 11, 2024
22c28bd
Memory64Lowering: Handle -1 return value from memory.grow (#6733)
sbc100 Jul 11, 2024
c0286b6
Do not abbreviate items in element segments (#6737)
tlively Jul 12, 2024
0e0e08d
SafeHeap: Handle overflows when adding the pointer and the size (#6409)
kripken Jul 12, 2024
eda6530
[threads] ref.i31_shared (#6735)
tlively Jul 12, 2024
20c10df
Remove non-standard `i31.new` (#6736)
tlively Jul 12, 2024
d2a48af
Monomorphize dropped functions (#6734)
kripken Jul 12, 2024
65ee5b9
[threads] Fix struct op validation for shared null (#6742)
tlively Jul 13, 2024
aec516f
[threads] Test that array ops work with shared nulls (#6743)
tlively Jul 13, 2024
fd8b2bd
Allow different arguments for multiple instances of a pass (#6687)
DirtyHairy Jul 15, 2024
503fc4b
[NFC] Fix changelog order after #6687 (#6748)
kripken Jul 15, 2024
5bdc0f4
Simplify fuzzer generation of function references (#6745)
tlively Jul 16, 2024
0964a6a
[threads] Fix encoding of shared types (#6746)
tlively Jul 16, 2024
afef6d3
Remove extra space printed in empty structs (#6750)
tlively Jul 16, 2024
ee43476
[NFC] Clarify and standardize order in flexibleCopy (#6749)
kripken Jul 16, 2024
9de9d05
[threads] Allow i31refs of mixed shareability to compare equal (#6752)
tlively Jul 16, 2024
53b7dd1
[threads] Update TypeSSA for shared types (#6753)
tlively Jul 16, 2024
43e8809
Add C and JS APIs to control more pass options (#6713)
vouillon Jul 16, 2024
a8df0bf
[NFC][threads] Ignore type-ssa-shared.wast in fuzzer (#6754)
tlively Jul 16, 2024
d91f1c4
[threads] Fix feature detection for shared basic heap types (#6756)
tlively Jul 16, 2024
6d2bef3
[threads] Validate all features required by ref.null (#6757)
tlively Jul 16, 2024
994d8d3
Make it possible to skip several passes (#6714)
vouillon Jul 17, 2024
55d888a
[threads] Validate all features required by ref.null (#6758)
tlively Jul 17, 2024
9cee7d0
[NFC] Add changelog entries for the last release and since (#6755)
kripken Jul 17, 2024
ddf919b
Error more clearly on wasm components (#6751)
kripken Jul 17, 2024
a9758b8
[threads][NFC] Do not include cont in shared types test (#6759)
tlively Jul 17, 2024
4dee6fe
Revert "[threads] Allow i31refs of mixed shareability to compare equa…
tlively Jul 17, 2024
1e7be1e
Update the ref_eq.wast spec test to match upstream (#6762)
tlively Jul 17, 2024
1434591
[threads] Fix shared ref.eq and disallow mixed-shareability (#6763)
tlively Jul 17, 2024
29746f1
[threads] Simplify and generalize heap type writing without GC (#6765)
tlively Jul 17, 2024
6b93a84
binaryen.js: Avoid catching exit, which confuses Node error reporting…
kripken Jul 17, 2024
0843618
[threads] Simplify and generalize reftype writing without GC (#6766)
tlively Jul 18, 2024
b91966f
Monomorphize all the things (#6760)
kripken Jul 18, 2024
fd867a3
[threads] ref.i31_shared requires shared-everything in validation (#6…
tlively Jul 18, 2024
a744bec
Validate features for types used in tables (#6768)
tlively Jul 18, 2024
7b1ef0c
Monomorphization: Add a limit on the number of parameters (#6774)
kripken Jul 18, 2024
5a6eb16
Validate features for types used in element segments (#6769)
tlively Jul 18, 2024
848a289
[threads] Update the fuzzer for shared types (#6771)
tlively Jul 18, 2024
84daeca
[NFC] Add HeapType::isMaybeShared(BasicHeapType) utility (#6773)
tlively Jul 18, 2024
a8066e6
Heap2Local: Properly handle failing array casts (#6772)
kripken Jul 18, 2024
0973589
Make FunctionInfo's assignment operator argument const (#6780)
dschuff Jul 23, 2024
538c528
[threads] Calculate shared heap type depths in subtypes.h (#6777)
tlively Jul 23, 2024
353e19e
Properly validate ref.cast when lacking a common supertype (#6741)
kripken Jul 23, 2024
017b473
Validate RefAsNonNull (#6785)
kripken Jul 24, 2024
d903dd3
TupleOptimization: Properly handle subtyping in copies (#6786)
kripken Jul 25, 2024
9cc1cb1
Cost analysis: Remove "Unacceptable" hack (#6782)
kripken Jul 25, 2024
f938154
[wasm-reduce] Do not crash on non-func element segments (#6778)
tlively Jul 26, 2024
eac0846
Generalize Literal::externalize/internalize for strings and shareabil…
kripken Jul 29, 2024
6645f0c
Fix shareability of internalized nulls (#6789)
kripken Jul 29, 2024
e2f666a
Add a Tarjan's Strongly Connected Component utilty (#6790)
tlively Jul 30, 2024
5078d4d
Add a customizable title to Metrics reporting (#6792)
kripken Jul 30, 2024
e6bbff7
Fix shareability of externalized nulls (#6791)
kripken Jul 30, 2024
c689781
Use Names::getValidNameGivenExisting in binary reading (#6793)
kripken Jul 31, 2024
705c28d
[NFC] Avoid a temp local (#6800)
kripken Aug 1, 2024
2a7c093
Add a disjoint sets (union-find) utility (#6797)
tlively Aug 1, 2024
8d2c9ff
Fix shareability handling in TypeSSA collision logic (#6798)
kripken Aug 1, 2024
53d54d7
[LegalizeJSInterface] Use explicit names for stub functions (#6806)
sbc100 Aug 5, 2024
5573cdb
Add a utility for iterating over all topological orders (#6801)
tlively Aug 5, 2024
d9c44af
[NFC] Remove unused `isException` type methods (#6802)
tlively Aug 5, 2024
e2e5b9c
WasmBinaryReader: Use helper function to create names for items. NFC …
sbc100 Aug 5, 2024
6fe3d88
Make source parser consistent with binary parser when naming things. …
sbc100 Aug 6, 2024
bae0da0
[NFC] Add HeapType::getKind returning a new HeapTypeKind enum (#6804)
tlively Aug 6, 2024
1c3578c
Fix sharedness bug in inhabitable type fuzzer (#6807)
tlively Aug 6, 2024
a985e16
[Source maps] Handle single-segment entries in source map header deco…
osa1 Aug 6, 2024
d5a5425
Restore isString type methods (#6815)
tlively Aug 6, 2024
0c26948
[FP16] Implement load and store instructions. (#6796)
brendandahl Aug 6, 2024
23a1a1a
[parser] Fix bug when printing type builder errors (#6817)
tlively Aug 7, 2024
9163e0d
[NFC][parser] Rename deftype and subtype (#6819)
tlively Aug 7, 2024
dc87572
GTO: Remove minor optimization of avoiding ChildLocalizer sometimes (…
kripken Aug 7, 2024
fb6ead8
[FP16] Disable float 16 fuzzing for now. (#6822)
brendandahl Aug 7, 2024
2397f2a
Add a utility for comparing and hashing rec group shapes (#6808)
tlively Aug 8, 2024
c9fd92c
Simplify TopologicalOrders (#6811)
tlively Aug 8, 2024
d945aa4
[FP16] Implement lane access instructions. (#6821)
brendandahl Aug 8, 2024
b3e22d2
[FP16] Implement relation operations. (#6825)
brendandahl Aug 9, 2024
3386e64
Typed continuations: update syntax of handler clauses (#6824)
frank-emrich Aug 9, 2024
e729e01
Set hasExplicitName for thunks generated in FuncCastEmulation. NFC (#…
sbc100 Aug 9, 2024
a4f9128
GlobalTypeOptimization: Reorder fields in order to remove them (#6820)
kripken Aug 12, 2024
d7955a3
Add a TypeBuilder API for copying a heap type (#6828)
tlively Aug 13, 2024
9ce4b8a
[NFC] Separate out GlobalTypeRewriter::mapTypeNames (#6829)
tlively Aug 13, 2024
6dc5b90
Add missing parser error check in makeArrayInitElem (#6835)
sofiaaberegg Aug 13, 2024
0c84afe
Heap2Local: Track interactions in detail (#6834)
kripken Aug 13, 2024
39553a0
Monomorphization: Add a flag to control the required improvement (#6837)
kripken Aug 14, 2024
bcb83fd
Count supertypes when collecting module types (#6838)
tlively Aug 14, 2024
cde2a52
Heap type `none` requires GC (#6840)
tlively Aug 14, 2024
ad08022
Save build ID in a source map (#6799)
loganek Aug 15, 2024
d567578
[NFC] Clean up Literal copy constructor (#6841)
kripken Aug 15, 2024
033a16e
Simplify validation of stale types (#6842)
tlively Aug 15, 2024
c2b4380
[NFC] Avoid v128 in rec groups with no other v128 uses (#6843)
kripken Aug 15, 2024
7209629
Testing: Add an env var to pick the V8 binary (#6836)
kripken Aug 16, 2024
958ff41
Implement table.init (#6827)
kripken Aug 16, 2024
95a4d5d
Fix direct comparisons with unshared basic heap types (#6845)
tlively Aug 16, 2024
e058bfb
Add a pass for minimizing recursion groups (#6832)
tlively Aug 17, 2024
0b05a3e
[NFC] Use HeapType::getKind more broadly (#6846)
tlively Aug 19, 2024
127844c
Print explicit typeuses for non-MVP function types (#6851)
tlively Aug 19, 2024
2c9c74d
Validate array.init_elem segment in IRBuilder (#6852)
tlively Aug 19, 2024
340ad71
[Exceptions] Finish interpreter + optimizer support for try_table. (#…
sjrd Aug 20, 2024
435eeea
Add the upstream spec testsuite as a submodule (#6853)
tlively Aug 21, 2024
9772dc6
Fix encoding of heap type definitions (#6856)
tlively Aug 21, 2024
adf53b3
[NFC] Triage spec test problems (#6857)
tlively Aug 21, 2024
7889abf
Support `ref.extern n` in spec tests (#6858)
tlively Aug 21, 2024
21ddb85
[NFC] hash constant string as void* (#6863)
tlively Aug 21, 2024
99db0d9
[FP16] Implement arithmetic operations. (#6855)
brendandahl Aug 21, 2024
692e55c
Add a string lowering mode disallowing non-UTF-8 strings (#6861)
tlively Aug 21, 2024
60bd610
[NFC] Avoid quadratic time in StackIROptimizer::removeUnneededBlocks(…
kripken Aug 21, 2024
2d99e10
[NFC] Avoid quadratic time when precomputing blocks (#6862)
kripken Aug 21, 2024
95a280f
[FP16] Add a feature flag for FP16. (#6864)
brendandahl Aug 22, 2024
dacc6e5
Support more reference constants in wast scripts (#6865)
tlively Aug 26, 2024
b7af8da
Fix the fp16 header include. (#6871)
brendandahl Aug 26, 2024
5018114
Fix null dereference in FunctionValidator (#6849)
mtb0x1 Aug 26, 2024
459bc07
[NFC] Optimize ParamUtils::getUsedParams() (#6866)
kripken Aug 26, 2024
6c2d0e2
[FP16] Implement unary operations. (#6867)
brendandahl Aug 27, 2024
52118e5
Check for required actions when parsing wast (#6874)
tlively Aug 27, 2024
e2ceaa5
Rename relaxed SIMD fma instructions to match spec. (#6876)
brendandahl Aug 27, 2024
95ddd05
[NFC] Refactor LocalGraph's core getSets API (#6877)
kripken Aug 28, 2024
9924683
Ignore fp16 in the fuzzer (#6881)
kripken Aug 29, 2024
aa75698
Move lit test temporary files to out/test/ (#6887)
tlively Aug 29, 2024
b63aead
Add a utility for finding minimal topological sorts (#6884)
tlively Aug 29, 2024
871ff0d
Simplify ReorderGlobals using new topological sort utils (#6885)
tlively Aug 29, 2024
bc55a3e
Only generate string.consts custom section if it is needed.
gkdn Aug 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix TableFill bounds checking (WebAssembly#6621)
The offsets are unsigned.
kripken authored May 21, 2024
commit 772e57234c3cba9bdc6432d42017f7c22b3f6e56
13 changes: 4 additions & 9 deletions src/wasm-interpreter.h
Original file line number Diff line number Diff line change
@@ -3137,21 +3137,16 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
}
auto info = getTableInstanceInfo(curr->table);

auto* table = self()->wasm.getTable(info.name);
Index dest = table->indexType == Type::i64
? destFlow.getSingleValue().geti64()
: destFlow.getSingleValue().geti32();
auto dest = destFlow.getSingleValue().getUnsigned();
Literal value = valueFlow.getSingleValue();
Index size = table->indexType == Type::i64
? sizeFlow.getSingleValue().geti64()
: sizeFlow.getSingleValue().geti32();
auto size = sizeFlow.getSingleValue().getUnsigned();

Index tableSize = info.interface()->tableSize(info.name);
auto tableSize = info.interface()->tableSize(info.name);
if (dest + size > tableSize) {
trap("out of bounds table access");
}

for (Index i = 0; i < size; ++i) {
for (uint64_t i = 0; i < size; i++) {
info.interface()->tableStore(info.name, dest + i, value);
}
return Flow();
32 changes: 32 additions & 0 deletions test/lit/exec/table.fill.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.

;; RUN: wasm-opt %s -all --fuzz-exec-before -q -o /dev/null 2>&1 | filecheck %s

(module
(type $i32 (func (result i32)))

(table $table 32 32 funcref)

(func $i32 (type $i32) (result i32)
(i32.const 0)
)

;; CHECK: [fuzz-exec] calling fill
;; CHECK-NEXT: [trap out of bounds table access]
(func $fill (export "fill")
;; This fill is out of bounds as the -1 is unsigned. Nothing will be written.
(table.fill $table
(i32.const 1)
(ref.func $i32)
(i32.const -1)
)
)
;; CHECK: [fuzz-exec] calling call
;; CHECK-NEXT: [trap uninitialized table element]
(func $call (export "call") (result i32)
;; Nothing was written, so this traps.
(call_indirect $table (type $i32)
(i32.const 1)
)
)
)