GitLab will be upgraded on June 2nd 2020 at 2.00 pm (AEDT) to 3.00 pm (AEDT) due to Critical Security Patch Availability. During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to local Gitlab admin team.

Commit 1f230479 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Fixed REFCAST validation

parent 7cbb3c73
......@@ -158,7 +158,7 @@ impl MuType {
pub fn is_funcref(&self) -> bool {
match self.v {
MuType_::Struct(_) => true,
MuType_::FuncRef(_) => true,
_ => false
}
}
......
......@@ -2725,10 +2725,9 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
impl_to_ty.is_double())
}
ConvOp::REFCAST => {
(impl_from_ty.is_ref() || impl_from_ty.is_iref() ||
impl_from_ty.is_funcref()) &&
(impl_to_ty.is_ref() || impl_to_ty.is_iref() ||
impl_to_ty.is_funcref())
(impl_from_ty.is_ref() && impl_to_ty.is_ref()) ||
(impl_from_ty.is_iref() && impl_to_ty.is_iref()) ||
(impl_from_ty.is_funcref() && impl_to_ty.is_funcref())
}
ConvOp::PTRCAST => {
(impl_from_ty.is_ptr() || impl_from_ty.is_int()) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment