当我将我的项目与库的静态版本链接时,VALGRIND 开始报告错误编号“条件跳转或移动取决于未初始化的值”错误。项目本身除了空的 main 函数之外不包含任何东西的问题,所以问题肯定出在库中。
库的共享和静态二进制文件是分开编译的,当库链接为共享时,VALGRIND 不会报告任何内容。
==4691== Conditional jump or move depends on uninitialised value(s)
==4691== at 0x8108A88: __linkin_atfork (in /...)
==4691== by 0x80F60CC: ptmalloc_init (in /...)
==4691== by 0x80FA075: malloc_hook_ini (in /...)
==4691== by 0x80F9FB8: malloc (in /...)
==4691== by 0x812C9EB: _dl_init_paths (in /...)
==4691== by 0x81093AF: _dl_non_dynamic_init (in /...)
==4691== by 0x8109E5E: __libc_init_first (in /...)
==4691== by 0x80DC90D: (below main) (in /...)
==4691== Uninitialised value was created
==4691== at 0x812A68E: brk (in /...)
==4691== by 0x81065AC: sbrk (in /...)
==4691== by 0x80DCC88: __libc_setup_tls (in /...)
==4691== by 0x80DCE39: __pthread_initialize_minimal (in /...)
==4691== by 0x80DC8AA: (below main) (in /...)
这个错误应该被忽略还是可以以某种方式解决?