在我的程序启动之前,我接收到未初始化的值消息,这些消息引用了不在程序中的函数调用。我很困惑,为什么我收到这些信息,我如何才能清理它们?

==24266== Conditional jump or move depends on uninitialised value(s)
==24266==    at 0x809098A: __linkin_atfork (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x80919EB: _dl_non_dynamic_init (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x80921B1: __libc_init_first (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x805F60B: (below main) (in /home/mbarry/workspace/datapup/src/plugin)
==24266==  Uninitialised value was created
==24266==    at 0x8091662: _dl_sysinfo_int80 (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x80BE31F: brk (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x808DE99: sbrk (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x805F96B: __libc_setup_tls (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x805FB66: __pthread_initialize_minimal (in /home/mbarry/workspace/datapup/src/plugin)
==24266==    by 0x805F5A3: (below main) (in /home/mbarry/workspace/datapup/src/plugin)

最佳答案

在gcc生成文件中使用-D_THREAD_SAFE-D_REENTRANT-static标志不正确,导致内存问题。

关于c - 程序启动前valgrind奇怪的条件跳转消息,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10335268/

10-17 00:19