Closed GorogPeter closed 1 year ago
I don't think this is correct, since it removes the alignment requirement.
A bit more context:
https://github.com/Samsung/walrus/blob/interp/src/parser/WASMParser.cpp#L899
The valueSizeInStack
does not represent the size of the value which needs to be transferred. Hence, the if (sz == 4)
is incorrect and m_result.m_globalTypes[index]->type()
should be used to determine the size of the transfer.
The m_result.m_globalTypes[index]->type()
could be moved to a local variable, and compared to Value::I32
or Value::F32
.
Thank you!
Fixing condition and return value.