diff options
author | Rickard Green <[email protected]> | 2010-09-03 18:56:14 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-09-03 18:56:14 +0200 |
commit | cac3a16a49d0ba8c4694d985b17403ac4456ade7 (patch) | |
tree | 78fa24b13a5878c622a8b8a2117b42fb4660728a /lib/crypto/c_src/crypto.c | |
parent | e752dcdefda84291cf819036a600b983326dae25 (diff) | |
parent | ab64b20d32d9f496607d7a2d545194ad8d308956 (diff) | |
download | otp-cac3a16a49d0ba8c4694d985b17403ac4456ade7.tar.gz otp-cac3a16a49d0ba8c4694d985b17403ac4456ade7.tar.bz2 otp-cac3a16a49d0ba8c4694d985b17403ac4456ade7.zip |
Merge branch 'rickard/valgrind-improvements/OTP-8760' into dev
* rickard/valgrind-improvements/OTP-8760:
Build opt, debug and valgrind libraries as separate libraries
Add erlang:system_info(build_type)
Fix valgrind build
Diffstat (limited to 'lib/crypto/c_src/crypto.c')
-rw-r--r-- | lib/crypto/c_src/crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 8823bba3b6..1f69c3c27f 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -64,8 +64,8 @@ # define ERL_VALGRIND_ASSERT_MEM_DEFINED(ptr,size) \ ((void) ((VALGRIND_CHECK_MEM_IS_DEFINED(ptr,size) == 0) ? 1 : \ - (fprintf(stderr,"\r\n####### VALGRIND_ASSSERT(%p,%d) failed at %s:%d\r\n",\ - (ptr),(size), __FILE__, __LINE__), abort(), 0))) + (fprintf(stderr,"\r\n####### VALGRIND_ASSSERT(%p,%ld) failed at %s:%d\r\n",\ + (ptr),(long)(size), __FILE__, __LINE__), abort(), 0))) #else # define ERL_VALGRIND_MAKE_MEM_DEFINED(ptr,size) # define ERL_VALGRIND_ASSERT_MEM_DEFINED(ptr,size) @@ -1119,7 +1119,7 @@ static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TER enif_alloc_binary(RSA_size(rsa), &ret_bin); if (argv[3] == atom_true) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(buf+i,data_len); + ERL_VALGRIND_ASSERT_MEM_DEFINED(data_bin.data,data_bin.size); i = RSA_public_encrypt(data_bin.size, data_bin.data, ret_bin.data, rsa, padding); if (i > 0) { @@ -1167,7 +1167,7 @@ static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE enif_alloc_binary(RSA_size(rsa), &ret_bin); if (argv[3] == atom_true) { - ERL_VALGRIND_ASSERT_MEM_DEFINED(buf+i,data_len); + ERL_VALGRIND_ASSERT_MEM_DEFINED(data_bin.data,data_bin.size); i = RSA_private_encrypt(data_bin.size, data_bin.data, ret_bin.data, rsa, padding); if (i > 0) { |