Valgrind在std :: string :: swap中报告SIGILL

问题描述 投票:-1回答:1

我正在使用valgrind 3.16调试程序,它在std :: string :: swap中报告了非法指令。该程序在带有g ++ 7.5.0的Ubuntu 18.04上编译。

vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0xFE 0x8 0x6F 0x47 0x1 0xC5 0xF8 0x11
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==392550== valgrind: Unrecognised instruction at address 0x3fef89.
==392550==    at 0x3FEF89: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (in /tmp/tmp.BnUAMaceSS/cmake-build-release-parallel-chameleon/release/lqf-tpch-query-dev)
==392550==    by 0x4F4CD0C: std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)

我有两个问题:

  1. 是否有网站可以使用给定的OP代码查询说明?我尝试了this website,但找不到与0x62 0xF1 0xFE ...

  2. 相对应的任何内容
  3. 为什么valgrind在标准库中报告SIGILL?

该代码本身运行良好。我还应用了未定义,线程,泄漏和地址清理程序以及堆栈检查。他们报告没有错误。所以我认为问题出在valgrind。

c++ valgrind
1个回答
0
投票

我非常感谢@TedLyngmo对使用消毒剂的评论。尽管消毒剂本身没有任何错误,但是在应用消毒剂后,错误位置会更改。现在它指向我的一些使用AVX 512指令的代码库。当我替换这些指令时,Valgrind可以运行。

尽管我仍然不确定为什么要使用消毒剂会产生这种效果,但我想与以后可能遇到类似错误的人分享这种经验。

© www.soinside.com 2019 - 2024. All rights reserved.