2

我正在使用 openssl 库。我收到了很多来自 valgrind 的警告,比如

==923== Conditional jump or move depends on uninitialised value(s)
==923==    at 0x66614C: ssl3_get_finished (in ./app.out)
==923==    by 0x65FA39: ssl3_connect (in ./app.out)
==923==    by 0x63A9E4: ossl_connect_common (in ./app.out)
==923==    by 0x63C054: Curl_ossl_connect (in ./app.out)
==923==    by 0x625DA6: Curl_ssl_connect (in ./app.out)
==923==    by 0x62B2BF: Curl_http_connect (in ./app.out)
==923==    by 0x6372ED: Curl_protocol_connect (in ./app.out)
==923==    by 0x637599: Curl_setup_conn (in ./app.out)
==923==    by 0x637643: Curl_connect (in ./app.out)
==923==    by 0x640A70: Curl_do_perform (in ./app.out)

==923== 
==923== Syscall param write(buf) points to uninitialised byte(s)
==923==    at 0x507ECCD: ??? (syscall-template.S:82)
==923==    by 0x6859EC: sock_write (in ./app.out)
==923==    by 0x583A86: BIO_write (in ./app.out)
==923==    by 0x6640AF: ssl3_write_pending (in ./app.out)
==923==    by 0x664734: ssl3_write_bytes (in ./app.out)
==923==    by 0x63891D: ossl_send (in ./app.out)
==923==    by 0x62F4B1: Curl_write (in ./app.out)
==923==    by 0x62BFF5: Curl_add_buffer_send (in ./app.out)
==923==    by 0x62DE8F: Curl_http (in ./app.out)
==923==    by 0x6378AA: Curl_do (in ./app.out)
==923==    by 0x640AE8: Curl_do_perform (in ./app.out)

==923==  Address 0xa2262ca is 490 bytes inside a block of size 17,584 alloc'd
==923==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==923==    by 0x581B93: CRYPTO_malloc (in ./app.out)
==923==    by 0x666B6F: ssl3_setup_write_buffer (in ./app.out)
==923==    by 0x666BD6: ssl3_setup_buffers (in ./app.out)
==923==    by 0x666E63: ssl23_connect (in ./app.out)
==923==    by 0x63A9E4: ossl_connect_common (in ./app.out)
==923==    by 0x63C054: Curl_ossl_connect (in ./app.out)
==923==    by 0x625DA6: Curl_ssl_connect (in ./app.out)
==923==    by 0x62B2BF: Curl_http_connect (in ./app.out)
==923==    by 0x6372ED: Curl_protocol_connect (in ./app.out)
==923==    by 0x637599: Curl_setup_conn (in ./app.out)
==923==    by 0x637643: Curl_connect (in ./app.out)
==923== 

有没有办法可以抑制来自 valgrind 的警告?

4

0 回答 0