You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Just b <- asConstantPred c =pure$!if b then x else y
|otherwise=return x
This is plainly wrong, as it just returns the first FnVal in the case that the predicate isn't statically known. It should probably panic instead. This code is also reachable via this CanMux instance:
Crucible doesn't really support muxing function handles, but it does have this
muxHandle
operation:crucible/crucible/src/Lang/Crucible/Simulator/RegValue.hs
Lines 269 to 277 in 3ed848a
This is plainly wrong, as it just returns the first
FnVal
in the case that the predicate isn't statically known. It should probably panic instead. This code is also reachable via thisCanMux
instance:crucible/crucible/src/Lang/Crucible/Simulator/RegValue.hs
Lines 279 to 282 in 3ed848a
Both of these are exported.
I'd advocate for:
tryMuxHandle
function that returns aMaybe
muxHandle
to calltryMuxHandle
andpanic
onNothing
CanMux
instance, because it is likely to lead to surprisesHowever, all of these except the first are breaking changes.
The text was updated successfully, but these errors were encountered: