valgrind를 사용하여 응용 프로그램을 디버깅하는 데 도움이되었을 때 표준 라이브러리에 대해 불평할만한 잡음이 발생했습니다. 시험으로 나는 이것을했다;Valgrind '잡음'은 무엇을 의미합니까?
echo 'int main() {return 0;}' | gcc -x c -o test -
그런 다음이 작업을 수행했습니다.
valgrind ./test
==1096== Use of uninitialised value of size 8
==1096== at 0x400A202: _dl_new_object (in /lib64/ld-2.10.1.so)
==1096== by 0x400607F: _dl_map_object_from_fd (in /lib64/ld-2.10.1.so)
==1096== by 0x4007A2C: _dl_map_object (in /lib64/ld-2.10.1.so)
==1096== by 0x400199A: map_doit (in /lib64/ld-2.10.1.so)
==1096== by 0x400D495: _dl_catch_error (in /lib64/ld-2.10.1.so)
==1096== by 0x400189E: do_preload (in /lib64/ld-2.10.1.so)
==1096== by 0x4003CCD: dl_main (in /lib64/ld-2.10.1.so)
==1096== by 0x401404B: _dl_sysdep_start (in /lib64/ld-2.10.1.so)
==1096== by 0x4001471: _dl_start (in /lib64/ld-2.10.1.so)
==1096== by 0x4000BA7: (within /lib64/ld-2.10.1.so)
* large block of similar snipped *
==1096== Use of uninitialised value of size 8
==1096== at 0x4F35FDD: (within /lib64/libc-2.10.1.so)
==1096== by 0x4F35B11: (within /lib64/libc-2.10.1.so)
==1096== by 0x4A1E61C: _vgnU_freeres (vg_preloaded.c:60)
==1096== by 0x4E5F2E4: __run_exit_handlers (in /lib64/libc-2.10.1.so)
==1096== by 0x4E5F354: exit (in /lib64/libc-2.10.1.so)
==1096== by 0x4E48A2C: (below main) (in /lib64/libc-2.10.1.so)
==1096==
==1096== ERROR SUMMARY: 3819 errors from 298 contexts (suppressed: 876 from 4)
==1096== malloc/free: in use at exit: 0 bytes in 0 blocks.
==1096== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==1096== For counts of detected errors, rerun with: -v
==1096== Use --track-origins=yes to see where uninitialised values come from
==1096== All heap blocks were freed -- no leaks are possible.
당신은 여기에 전체 결과를 볼 수 있습니다 http://pastebin.com/gcTN8xGp
내가이 개 질문을; 첫째로 모든 소음을 억제하는 방법이 있습니까?
- show-below-main은 기본적으로 no로 설정되어 있지만 --show-after-main으로 표시되지 않습니다.
이 문제는 Valgrind가 익숙한 것보다 새로운 glibc를 사용했을 때 발생했습니다. +1 날 올바른 방향으로 가리 킵니다. –