Skip to content

Commit deb758e

Browse files
authored
Fix use of uninitialized value in WastParser::ParseSimdV128Const. (#2668)
Found this from msan. See b/461044733.
1 parent d8184ba commit deb758e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wast-parser.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,7 +2952,7 @@ Result WastParser::ParseF32(Const* const_, ConstType const_type) {
29522952
}
29532953

29542954
auto literal = token.literal();
2955-
uint32_t f32_bits;
2955+
uint32_t f32_bits = 0;
29562956
Result result = ParseFloat(literal.type, literal.text, &f32_bits);
29572957
const_->set_f32(f32_bits);
29582958
return result;
@@ -2972,7 +2972,7 @@ Result WastParser::ParseF64(Const* const_, ConstType const_type) {
29722972
}
29732973

29742974
auto literal = token.literal();
2975-
uint64_t f64_bits;
2975+
uint64_t f64_bits = 0;
29762976
Result result = ParseDouble(literal.type, literal.text, &f64_bits);
29772977
const_->set_f64(f64_bits);
29782978
return result;

0 commit comments

Comments
 (0)