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
let result = run_memcpy_on(&context,&module, alignment);
657
665
658
-
run_memcpy_on(&context,&module, alignment);
659
-
660
-
if alignment == 0 || alignment.is_power_of_two(){
661
-
assert!(module.verify().is_ok(),"alignment of {:?} was neither 0 nor a power of 2, but did not verify for memcpy.", alignment);
666
+
ifis_alignment_ok(alignment){
667
+
assert!(result.is_ok() && module.verify().is_ok(),"alignment of {} was a power of 2 under 2^64, but did not verify for memcpy.", alignment);
662
668
}else{
663
-
assert!(module.verify().is_err(),"alignment of {:?} was neither 0 nor a power of 2, yet verification passed for memcpy when it should not have.", alignment);
669
+
assert!(result.is_err(),"alignment of {} was a power of 2 under 2^64, yet verification passed for memcpy when it should not have.", alignment);
664
670
}
665
671
666
-
run_memmove_on(&context,&module, alignment);
672
+
let result = run_memmove_on(&context,&module, alignment);
667
673
668
-
ifalignment == 0 || alignment.is_power_of_two(){
669
-
assert!(module.verify().is_ok(),"alignment of {:?} was neither 0 nor a power of 2, but did not verify for memmov.", alignment);
674
+
ifis_alignment_ok(alignment){
675
+
assert!(result.is_ok() && module.verify().is_ok(),"alignment of {} was a power of 2 under 2^64, but did not verify for memmove.", alignment);
670
676
}else{
671
-
assert!(module.verify().is_err(),"alignment of {:?} was neither 0 nor a power of 2, yet verification passed for memmov when it should not have.", alignment);
677
+
assert!(result.is_err(),"alignment of {} was a power of 2 under 2^64, yet verification passed for memmove when it should not have.", alignment);
0 commit comments