4

我正在使用 valgrind 来尝试定位 C-cum-C++ 程序中违反内存访问的原因。即使避免了这种访问(即当一切正常时),valgrind 告诉我:

==11436== Memcheck, a memory error detector
==11436== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==11436== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==11436== Command: bin/monetdb-bp-reader /home/eyalroz/dbfarms/monetdb/tpch-sf-1
==11436== 
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24:
--11436-- Ignoring non-Dwarf2/3/4 block in .debug_info
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24:
--11436-- Last block truncated in .debug_info; ignoring
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24:
--11436-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /lib/x86_64-linux-gnu/libgcc_s.so.1:
--11436-- Ignoring non-Dwarf2/3/4 block in .debug_info
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /lib/x86_64-linux-gnu/libgcc_s.so.1:
--11436-- Last block truncated in .debug_info; ignoring
--11436-- WARNING: Serious error when reading debug info
--11436-- When reading debug info from /lib/x86_64-linux-gnu/libgcc_s.so.1:
--11436-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4

我应该如何处理这些警告?我是不是该...

  • 以某种方式修复它们?它在系统库中,而不是在我的代码中;甚至有可能对他们做点什么吗?
  • 以某种方式抑制它们(但不抑制任何真正的错误消息)?
  • 忽略它们——如果我既不能修复也不能压制?

注意:我在 X86_64 机器上使用带有内核 4.13.0-32 的 GNU/Linux Mint 18.4。

4

1 回答 1

4

这可能是由于在 libstdc++.so 中启用了压缩调试符号,请参阅相关的 debian 错误报告:https ://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810295 。

Valgrind 在 3.11 版本中不支持压缩调试符号,但它现在支持它们,请参阅https://bugs.kde.org/show_bug.cgi?id=303877。我建议将 Valgrind 更新到最新版本或从以下来源构建它:http: //valgrind.org/downloads/repository.html

于 2018-02-18T10:53:25.797 回答