-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type interning during Wasm-to-CLIF translation (#9374)
We were handling the case where we had fewer rec groups than types, in the case where a rec group defines multiple types, but were failing to handle the case when we have more rec groups than types due to empty rec groups. The fix is to bound the loop by the number of types, not the number of rec groups.
- Loading branch information
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
;; Test that we properly handle empty rec groups and when we have more rec | ||
;; groups defined in the type section than actual types (and therefore the | ||
;; length that the type section reports is greater than the length of the types | ||
;; index space). | ||
|
||
(module | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(rec) | ||
(type (func (param i32) (result i32))) | ||
) |