File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
FuzzTesting/FailCases/FuzzDifferential Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1636,6 +1636,7 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
16361636 private mutating func visitConst( _ type: ValueType , _ value: Value ) {
16371637 if let constSlotIndex = constantSlots. allocate ( value) {
16381638 valueStack. pushConst ( constSlotIndex, type: type)
1639+ iseqBuilder. resetLastEmission ( )
16391640 return
16401641 }
16411642 let value = UntypedValue ( value)
Original file line number Diff line number Diff line change 11(module
2- (func (export " check" ) (param i32 ) (result i32 )
2+ (func (export " check-limit " ) (param i32 ) (result i32 )
33 ;; Enough to reach the limit of constant slots
44 (drop (i32.const 1 ))
55 (drop (i32.const 2 ))
99 (drop (i32.const 6 ))
1010 (i32.add (local.get 0 ) (i32.add (i32.const 1 ) (i32.const 1 )))
1111 )
12+ (func (export " invalidate-relink" ) (result i32 )
13+ (local i32 )
14+ (i32.add (i32.const 1 ) (i32.const 1 ))
15+ ;; This constant should invalidate the relinking
16+ ;; connection of i32.add even though it doesn't
17+ ;; emit its own instruction.
18+ (i32.const 0 )
19+ (local.set 0 )
20+ (local.get 0 )
21+ )
1222)
1323
14- (assert_return (invoke " check" (i32.const 3 )) (i32.const 5 ))
24+ (assert_return (invoke " check-limit" (i32.const 3 )) (i32.const 5 ))
25+ (assert_return (invoke " invalidate-relink" ) (i32.const 0 ))
1526
You can’t perform that action at this time.
0 commit comments