Open zherczeg opened 2 months ago
Just so it does not get overlooked this is also present with br_table
.
For example this code:
(func (export "f6") (param i32 ) (result i32)
(local i32)
(block $end
(block
(block
local.get 0
(br_table 0 1 2)
)
i32.const 1
local.tee 1
return
)
i32.const 2
local.set 1
)
local.get 1
)
Local 1 should be initialized to zero but it is not.
Test case:
Byte code dump:
It seems
local 1
is not set to zero, and the function may return with garbage.