[klee-dev] [PATCH 3/3] Fix NotExpr::computeHash() shadowing hashValue
Cristian Cadar
c.cadar at imperial.ac.uk
Thu Jul 11 17:45:58 BST 2013
Hi Jonathan,
Thanks for these three patches; nice catch with the last one.
There were again no commit messages going to klee-commits about your
patches; after some googling, I found out that commit messages
containing non-ASCII characters are discarded, see the thread below:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080428/061915.html
So from now on I will unfortunately have to misspell your last name as
Neuschafer, sorry!
Finally, I would prefer to use klee-commits for patches, unless they are
likely to be of interest to the wider klee-dev audience.
Best,
Cristian
On 01/07/13 22:25, Jonathan Neuschäfer wrote:
> Without this patch NotExpr::computeHash() will have a local
> valiable with the name "hashValue" and assign the newly computed
> hash to that instead of the member variable with the same name
> that should be set by the computeHash method of every Expr subclass.
> ---
> lib/Expr/Expr.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
> index d177eca..1187573 100644
> --- a/lib/Expr/Expr.cpp
> +++ b/lib/Expr/Expr.cpp
> @@ -206,7 +206,7 @@ unsigned ReadExpr::computeHash() {
> }
>
> unsigned NotExpr::computeHash() {
> - unsigned hashValue = expr->hash() * Expr::MAGIC_HASH_CONSTANT * Expr::Not;
> + hashValue = expr->hash() * Expr::MAGIC_HASH_CONSTANT * Expr::Not;
> return hashValue;
> }
>
>
More information about the klee-dev
mailing list