c - 程序启动前valgrind奇怪的条件跳转信息

标签 c linux valgrind

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

==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 makefile 中错误地使用了 -D_THREAD_SAFE -D_REENTRANT -static 标志导致了内存问题。

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

相关文章:

regex - Bash - 包含唯一字母数字字符串的 XML 标签内的 grep 文本

c - `mkl_malloc` 上出现段错误

c - c集成程序中的舍入错误

c - MailKit 将 HtmlBody 以字符串形式写入数据库

linux - 自安装 Zip 文件(解压后运行应用程序)

linux - 如何在 x86 平台上运行 MIPS 二进制文件?

macOS Sierra 上的 Valgrind

c - CS50 Speller出现valgrind错误

c - 将 .txt 文件加载到 C 中并将数据放入数组中

c - 简单的 C 应用程序出现段错误