Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valgrind report #1437

Closed
aspcartman opened this issue Mar 20, 2015 · 2 comments
Closed

Valgrind report #1437

aspcartman opened this issue Mar 20, 2015 · 2 comments

Comments

@aspcartman
Copy link

So I just did a cargo new and changed main.rs as:

fn main() {
}

The output of valgrind target/debug/HelloWorld:

==38935== Memcheck, a memory error detector
==38935== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==38935== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info
==38935== Command: ./target/debug/HelloWorld
==38935==
==38935==
==38935== HEAP SUMMARY:
==38935==     in use at exit: 35,513 bytes in 424 blocks
==38935==   total heap usage: 510 allocs, 86 frees, 41,921 bytes allocated
==38935==
==38935== LEAK SUMMARY:
==38935==    definitely lost: 0 bytes in 0 blocks
==38935==    indirectly lost: 0 bytes in 0 blocks
==38935==      possibly lost: 0 bytes in 0 blocks
==38935==    still reachable: 104 bytes in 1 blocks
==38935==         suppressed: 35,409 bytes in 423 blocks
==38935== Rerun with --leak-check=full to see details of leaked memory
==38935==
==38935== For counts of detected and suppressed errors, rerun with: -v
==38935== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Thus everything is ok.

But valgrind cargo run:

==38953== Memcheck, a memory error detector
==38953== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==38953== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info
==38953== Command: cargo run
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x1000D9481: util::config::Config$LT$$u27$a$GT$::values::hc58fb9281611baafBjr (in /usr/local/bin/cargo)
==38953==    by 0x1000E2BC2: util::config::Config$LT$$u27$a$GT$::get::h4e81b6b51c9ad599vkr (in /usr/local/bin/cargo)
==38953==    by 0x1000E0BDE: util::config::Config$LT$$u27$a$GT$::get_string::h185429cf45f7e79cXnr (in /usr/local/bin/cargo)
==38953==    by 0x10019BA05: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==    by 0x100001C86: main::h86f1470dea54a8b6jca (in /usr/local/bin/cargo)
==38953==    by 0x1003B97C8: rust_try_inner (in /usr/local/bin/cargo)
==38953==    by 0x100001153: (below main) (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x1000D9889: util::config::Config$LT$$u27$a$GT$::values::hc58fb9281611baafBjr (in /usr/local/bin/cargo)
==38953==    by 0x1000E2BC2: util::config::Config$LT$$u27$a$GT$::get::h4e81b6b51c9ad599vkr (in /usr/local/bin/cargo)
==38953==    by 0x1000E0BDE: util::config::Config$LT$$u27$a$GT$::get_string::h185429cf45f7e79cXnr (in /usr/local/bin/cargo)
==38953==    by 0x10019BA05: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==    by 0x100001C86: main::h86f1470dea54a8b6jca (in /usr/local/bin/cargo)
==38953==    by 0x1003B97C8: rust_try_inner (in /usr/local/bin/cargo)
==38953==    by 0x100001153: (below main) (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x100C80C7A: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F5FB: ssleay_rand_add (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10079900A: RAND_poll (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070EE6B: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C1D: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F5FB: ssleay_rand_add (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10079903A: RAND_poll (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070EE6B: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==  Address 0x1064c18c0 is 16 bytes after a block of size 112 in arena "client"
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C6A: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F5FB: ssleay_rand_add (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10079903A: RAND_poll (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070EE6B: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==  Address 0x1064c1960 is 8 bytes after a block of size 104 alloc'd
==38953==    at 0x1005796C1: malloc (vg_replace_malloc.c:303)
==38953==    by 0x100724DF3: CRYPTO_malloc (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EA96: EVP_DigestInit_ex (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F4DC: ssleay_rand_add (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10079903A: RAND_poll (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070EE6B: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x100C80C9F: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F5FB: ssleay_rand_add (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070EEEF: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x1002F4586: git_libgit2_init (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x100C80C7A: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F1E9: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F6DA: ssleay_rand_pseudo_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C196C: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x1002F4586: git_libgit2_init (in /usr/local/bin/cargo)
==38953==    by 0x100266F7B: init::hd962b8d8efefe9eagmk (in /usr/local/bin/cargo)
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C1D: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F1E9: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C1985: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x1002F4586: git_libgit2_init (in /usr/local/bin/cargo)
==38953==    by 0x100266F7B: init::hd962b8d8efefe9eagmk (in /usr/local/bin/cargo)
==38953==    by 0x10026C5BA: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==  Address 0x1064c3f40 is 16 bytes after a block of size 112 in arena "client"
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C6A: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1007956C2: OPENSSL_cleanse (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EC69: EVP_MD_CTX_cleanup (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F1E9: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C1985: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x1002F4586: git_libgit2_init (in /usr/local/bin/cargo)
==38953==    by 0x100266F7B: init::hd962b8d8efefe9eagmk (in /usr/local/bin/cargo)
==38953==    by 0x10026C5BA: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==  Address 0x1064c3fe0 is 8 bytes after a block of size 104 alloc'd
==38953==    at 0x1005796C1: malloc (vg_replace_malloc.c:303)
==38953==    by 0x100724DF3: CRYPTO_malloc (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10073EA96: EVP_DigestInit_ex (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x10070F029: ssleay_rand_bytes (in /usr/lib/libcrypto.0.9.8.dylib)
==38953==    by 0x1006C1985: SSL_CTX_new (in /usr/lib/libssl.0.9.8.dylib)
==38953==    by 0x1002F4610: init_once (in /usr/local/bin/cargo)
==38953==    by 0x100C93AF3: __pthread_once_handler (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x100C82F12: _os_once (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x100C93A92: pthread_once (in /usr/lib/system/libsystem_pthread.dylib)
==38953==    by 0x1002F4586: git_libgit2_init (in /usr/local/bin/cargo)
==38953==    by 0x100266F7B: init::hd962b8d8efefe9eagmk (in /usr/local/bin/cargo)
==38953==    by 0x10026C5BA: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C1D: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1002E9423: parse_variable (in /usr/local/bin/cargo)
==38953==    by 0x1002E8A0E: config_parse (in /usr/local/bin/cargo)
==38953==    by 0x1002E7442: config_open (in /usr/local/bin/cargo)
==38953==    by 0x1002E5456: git_config_add_backend (in /usr/local/bin/cargo)
==38953==    by 0x1002E53B9: git_config_add_file_ondisk (in /usr/local/bin/cargo)
==38953==    by 0x1002E6D57: git_config_open_default (in /usr/local/bin/cargo)
==38953==    by 0x10026C5CB: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==    by 0x10019BAA3: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==  Address 0x1064c5780 is 16 bytes after a block of size 32 alloc'd
==38953==    at 0x1005796C1: malloc (vg_replace_malloc.c:303)
==38953==    by 0x10057A5AC: realloc (vg_replace_malloc.c:699)
==38953==    by 0x1002E9872: kh_resize_str (in /usr/local/bin/cargo)
==38953==    by 0x1002E8C63: config_parse (in /usr/local/bin/cargo)
==38953==    by 0x1002E7442: config_open (in /usr/local/bin/cargo)
==38953==    by 0x1002E5456: git_config_add_backend (in /usr/local/bin/cargo)
==38953==    by 0x1002E53B9: git_config_add_file_ondisk (in /usr/local/bin/cargo)
==38953==    by 0x1002E6D57: git_config_open_default (in /usr/local/bin/cargo)
==38953==    by 0x10026C5CB: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==    by 0x10019BAA3: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==
==38953== Invalid read of size 32
==38953==    at 0x100C80C21: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38953==    by 0x1002E9423: parse_variable (in /usr/local/bin/cargo)
==38953==    by 0x1002E8A0E: config_parse (in /usr/local/bin/cargo)
==38953==    by 0x1002E7442: config_open (in /usr/local/bin/cargo)
==38953==    by 0x1002E5456: git_config_add_backend (in /usr/local/bin/cargo)
==38953==    by 0x1002E53B9: git_config_add_file_ondisk (in /usr/local/bin/cargo)
==38953==    by 0x1002E6D57: git_config_open_default (in /usr/local/bin/cargo)
==38953==    by 0x10026C5CB: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==    by 0x10019BAA3: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==  Address 0x1064c60a0 is 15 bytes after a block of size 17 alloc'd
==38953==    at 0x1005796C1: malloc (vg_replace_malloc.c:303)
==38953==    by 0x1002E9ACC: reader_readline (in /usr/local/bin/cargo)
==38953==    by 0x1002E9315: parse_variable (in /usr/local/bin/cargo)
==38953==    by 0x1002E8A0E: config_parse (in /usr/local/bin/cargo)
==38953==    by 0x1002E7442: config_open (in /usr/local/bin/cargo)
==38953==    by 0x1002E5456: git_config_add_backend (in /usr/local/bin/cargo)
==38953==    by 0x1002E53B9: git_config_add_file_ondisk (in /usr/local/bin/cargo)
==38953==    by 0x1002E6D57: git_config_open_default (in /usr/local/bin/cargo)
==38953==    by 0x10026C5CB: config::Config::open_default::h3b1150b57d574761Afd (in /usr/local/bin/cargo)
==38953==    by 0x10019BAA3: ops::registry::http_proxy::h1facd5b63b794beb4co (in /usr/local/bin/cargo)
==38953==    by 0x10019BEAF: ops::registry::http_proxy_exists::hbd93100c21213085eeo (in /usr/local/bin/cargo)
==38953==    by 0x100006FC4: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x100108CC3: util::toml::project_layout::h580a3f7882e4773alCt (in /usr/local/bin/cargo)
==38953==    by 0x100107A94: ops::cargo_read_manifest::read_package::h4ec747e6eb698153PVi (in /usr/local/bin/cargo)
==38953==    by 0x10010CD19: ops::cargo_read_manifest::read_nested_packages::hb7d38cd507fd72ecF9i (in /usr/local/bin/cargo)
==38953==    by 0x10010B1C9: ops::cargo_read_manifest::walk::h14038966357734740614 (in /usr/local/bin/cargo)
==38953==    by 0x100109929: ops::cargo_read_manifest::read_packages::h387dbe9f6b94c3ae7Yi (in /usr/local/bin/cargo)
==38953==    by 0x1001A8817: sources::path::PathSource$LT$$u27$a$C$$u20$$u27$b$GT$::read_packages::ha076dd41b670c48aoTo (in /usr/local/bin/cargo)
==38953==    by 0x10010F8DE: ops::cargo_run::run::h5ac0e8ed486ced3cpcj (in /usr/local/bin/cargo)
==38953==    by 0x100042239: call_main_without_stdin::h973526862021846398 (in /usr/local/bin/cargo)
==38953==    by 0x10000BD74: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==    by 0x100001C86: main::h86f1470dea54a8b6jca (in /usr/local/bin/cargo)
==38953==    by 0x1003B97C8: rust_try_inner (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x10010AF67: ops::cargo_read_manifest::walk::h14038966357734740614 (in /usr/local/bin/cargo)
==38953==    by 0x10010B743: ops::cargo_read_manifest::walk::h14038966357734740614 (in /usr/local/bin/cargo)
==38953==    by 0x100109929: ops::cargo_read_manifest::read_packages::h387dbe9f6b94c3ae7Yi (in /usr/local/bin/cargo)
==38953==    by 0x1001A8817: sources::path::PathSource$LT$$u27$a$C$$u20$$u27$b$GT$::read_packages::ha076dd41b670c48aoTo (in /usr/local/bin/cargo)
==38953==    by 0x10010F8DE: ops::cargo_run::run::h5ac0e8ed486ced3cpcj (in /usr/local/bin/cargo)
==38953==    by 0x100042239: call_main_without_stdin::h973526862021846398 (in /usr/local/bin/cargo)
==38953==    by 0x10000BD74: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==    by 0x100001C86: main::h86f1470dea54a8b6jca (in /usr/local/bin/cargo)
==38953==    by 0x1003B97C8: rust_try_inner (in /usr/local/bin/cargo)
==38953==    by 0x100001153: (below main) (in /usr/local/bin/cargo)
==38953==
==38953== Conditional jump or move depends on uninitialised value(s)
==38953==    at 0x100154BB7: sync::mpsc::Receiver$LT$T$GT$::recv::h14442584173272513779 (in /usr/local/bin/cargo)
==38953==    by 0x1000D548B: ops::cargo_rustc::compile_targets::h9ebb5b9ff3dac5495sm (in /usr/local/bin/cargo)
==38953==    by 0x1000CDDE7: ops::cargo_compile::compile_pkg::hd80992372d69bc10moh (in /usr/local/bin/cargo)
==38953==    by 0x1000C9FB2: ops::cargo_compile::compile::h6b88dcd9dad61919ujh (in /usr/local/bin/cargo)
==38953==    by 0x10010FE16: ops::cargo_run::run::h5ac0e8ed486ced3cpcj (in /usr/local/bin/cargo)
==38953==    by 0x100042239: call_main_without_stdin::h973526862021846398 (in /usr/local/bin/cargo)
==38953==    by 0x10000BD74: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38953==    by 0x1000044A8: call_main_without_stdin::h17603844962363947862 (in /usr/local/bin/cargo)
==38953==    by 0x100001C86: main::h86f1470dea54a8b6jca (in /usr/local/bin/cargo)
==38953==    by 0x1003B97C8: rust_try_inner (in /usr/local/bin/cargo)
==38953==    by 0x100001153: (below main) (in /usr/local/bin/cargo)
==38953==
     Running `target/debug/HelloWorld`
==38956== Use of uninitialised value of size 8
==38956==    at 0x100C81243: _platform_strchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==38956==    by 0x100A99F8D: setenv (in /usr/lib/system/libsystem_c.dylib)
==38956==    by 0x100CF5B6E: xpc_atfork_child (in /usr/lib/system/libxpc.dylib)
==38956==    by 0x100895BAE: libSystem_atfork_child (in /usr/lib/libSystem.B.dylib)
==38956==    by 0x100A460A7: fork (in /usr/lib/system/libsystem_c.dylib)
==38956==    by 0x1003B43B8: sys::process2::Process::spawn::closure.45931 (in /usr/local/bin/cargo)
==38956==    by 0x1003A22BF: process::Command::spawn_inner::h2fa76f53fa0cc19aW2s (in /usr/local/bin/cargo)
==38956==    by 0x1003A4D48: process::Command::status::h464c86ef9b14dce8M5s (in /usr/local/bin/cargo)
==38956==    by 0x100113A44: util::process_builder::ProcessBuilder::exec::h38267657747e65a4act (in /usr/local/bin/cargo)
==38956==    by 0x100110EA3: ops::cargo_run::run::h5ac0e8ed486ced3cpcj (in /usr/local/bin/cargo)
==38956==    by 0x100042239: call_main_without_stdin::h973526862021846398 (in /usr/local/bin/cargo)
==38956==    by 0x10000BD74: execute::h0201643256249e00vca (in /usr/local/bin/cargo)
==38956==
==38953==
==38953== HEAP SUMMARY:
==38953==     in use at exit: 544,938 bytes in 3,773 blocks
==38953==   total heap usage: 30,387 allocs, 26,614 frees, 6,629,792 bytes allocated
==38953==
==38953== LEAK SUMMARY:
==38953==    definitely lost: 4,093 bytes in 53 blocks
==38953==    indirectly lost: 66,032 bytes in 2,169 blocks
==38953==      possibly lost: 15,200 bytes in 129 blocks
==38953==    still reachable: 96,224 bytes in 653 blocks
==38953==         suppressed: 363,389 bytes in 769 blocks
==38953== Rerun with --leak-check=full to see details of leaked memory
==38953==
==38953== For counts of detected and suppressed errors, rerun with: -v
==38953== Use --track-origins=yes to see where uninitialised values come from
==38953== ERROR SUMMARY: 158 errors from 14 contexts (suppressed: 0 from 0)
../valgrind-trunk/Inst/bin/valgrind cargo run  5.34s user 0.71s system 94% cpu 6.396 total

Something really bad is going on, guys...

@alexcrichton
Copy link
Member

Optimized code is known to generate valgrind errors, which could be the root cause of all the errors that you're seeing. Without a segfault happening I'm a little wary to say whether or not these errors are false positives or not.

@aspcartman
Copy link
Author

Oh. Thanks. That's an odd thing to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants