aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/Cshmgenproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-03-15 17:07:36 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-03-15 17:07:36 +0100
commit57d3627c69a812a037d2d4161941ce25d15082d1 (patch)
tree02f375b130eb6cdab00796fc3580d56684f95a70 /cfrontend/Cshmgenproof.v
parentb3294fbaf50539f254ff3bb7145e848b3f902f73 (diff)
downloadcompcert-kvx-57d3627c69a812a037d2d4161941ce25d15082d1.tar.gz
compcert-kvx-57d3627c69a812a037d2d4161941ce25d15082d1.zip
Revised semantics of comparisons between a pointer and 0.
It used to be that a pointer value (Vptr) always compare unequal to the null pointer (Vint Int.zero). However, this may not be true in the final machine code when pointer addition overflows and wraps around to the bit pattern 0. This patch checks the validity of the pointer being compared with 0, and makes the comparison undefined if the pointer is out of bounds. Note: only the IA32 back-end was updated, ARM and PowerPC need updating.
Diffstat (limited to 'cfrontend/Cshmgenproof.v')
-rw-r--r--cfrontend/Cshmgenproof.v1
1 files changed, 0 insertions, 1 deletions
diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v
index 7f61c657..847e4856 100644
--- a/cfrontend/Cshmgenproof.v
+++ b/cfrontend/Cshmgenproof.v
@@ -333,7 +333,6 @@ Proof.
econstructor; split. econstructor; eauto with cshm. simpl. eauto.
unfold Val.cmpu, Val.cmpu_bool. simpl.
destruct (Int.eq i Int.zero); simpl; constructor.
- exists Vtrue; split. econstructor; eauto with cshm. constructor.
(* long *)
econstructor; split. econstructor; eauto with cshm. simpl. unfold Val.cmpl. simpl. eauto.
destruct (Int64.eq i Int64.zero); simpl; constructor.