message: test: Add regression test for i32.{div, rem}_s garbage high part stack value
diff: @@ -671,6 +671,19 @@ TEST(execute_numeric, i32_div_s_overflow)
  ASSERT_TRUE(trap);
  }
  +TEST(execute_numeric, i32_div_s_stack_value)
  +{
  + /* wat2wasm
  + (func (result i64)
  + (i32.div_s (i32.const -3) (i32.const 2)) ;; Should put 0xffffffff on the stack.
  + i64.extend_u/i32
  + )
  + */
  + const auto wasm = from_hex("0061736d010000000105016000017e030201000a0a010800417d41026dad0b");
  +
  + EXPECT_RESULT(execute(parse(wasm), 0, {}), 0xffffffff);
  +}
  +
  TEST(execute_numeric, i32_div_u)
  {
  const auto [trap, ret] = execute_binary_operation(Instr::i32_div_u, 84, 2);
  @@ -701,6 +714,19 @@ TEST(execute_numeric, i32_rem_s_by_zero)
  ASSERT_TRUE(trap);
  }
  +TEST(execute_numeric, i32_rem_s_stack_value)
  +{
  + /* wat2wasm
  + (func (result i64)
  + (i32.rem_s (i32.const -3) (i32.const 2)) ;; Should put 0xffffffff on the stack.
  + i64.extend_u/i32
  + )
  + */
  + const auto wasm = from_hex("0061736d010000000105016000017e030201000a0a010800417d41026fad0b");
  +
  + EXPECT_RESULT(execute(parse(wasm), 0, {}), 0xffffffff);
  +}
  +
  TEST(execute_numeric, i32_rem_u)
  {
  const auto [trap, ret] = execute_binary_operation(Instr::i32_rem_u, 4242, 4200);
  