aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-06-12 10:46:26 +0200
committerSverker Eriksson <[email protected]>2013-06-12 18:02:43 +0200
commit797721617d11cfab32dbde9eea68c7a7353c8efe (patch)
tree114d742acdcd18e8b0fb089f14e5671b6a10a045
parentec59a1357bbbaf8698b9073a190215b703ccc538 (diff)
downloadotp-797721617d11cfab32dbde9eea68c7a7353c8efe.tar.gz
otp-797721617d11cfab32dbde9eea68c7a7353c8efe.tar.bz2
otp-797721617d11cfab32dbde9eea68c7a7353c8efe.zip
crypto: Supress some false positives from valgrind
-rw-r--r--erts/emulator/valgrind/suppress.standard2
-rw-r--r--lib/crypto/c_src/crypto.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/valgrind/suppress.standard b/erts/emulator/valgrind/suppress.standard
index beecf1a7b5..a4da31a61d 100644
--- a/erts/emulator/valgrind/suppress.standard
+++ b/erts/emulator/valgrind/suppress.standard
@@ -174,6 +174,7 @@ obj:*/crypto.valgrind.*
{
Crypto internal...
Memcheck:Cond
+...
obj:*/libcrypto.*
}
{
@@ -194,6 +195,7 @@ obj:*/crypto.valgrind.*
{
Crypto internal...
Memcheck:Value8
+...
obj:*/libcrypto.*
}
{
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 3b60cab043..c28ff8136c 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -3077,7 +3077,7 @@ static ERL_NIF_TERM bn2term(ErlNifEnv* env, const BIGNUM *bn)
dlen = BN_num_bytes(bn);
ptr = enif_make_new_binary(env, dlen, &ret);
BN_bn2bin(bn, ptr);
-
+ ERL_VALGRIND_MAKE_MEM_DEFINED(ptr, dlen);
return ret;
}
@@ -3100,7 +3100,7 @@ static ERL_NIF_TERM point2term(ErlNifEnv* env,
enif_release_binary(&bin);
return enif_make_badarg(env);
}
-
+ ERL_VALGRIND_MAKE_MEM_DEFINED(bin.data, bin.size);
return enif_make_binary(env, &bin);
}