gcc / C ++禁用生成vex指令 [英] gcc / C++ Disable generation of vex instructions
问题描述
我们正在调试我们的大型遗留应用程序的内存问题,并希望使用Valgrind来追踪它。该应用程序使用 ACE / TAO CORBA库,然而,Valgrind抱怨非法的vex 库中的指令。
== 29992 == Memcheck,一个内存错误检测器
== 29992 == Copyright(C)2002-2012,以及Julian Seward等人的GNU GPL'd。
== 29992 ==使用Valgrind-3.8.1和LibVEX;重新运行带-h的版权信息
== 29992 ==命令:DvMain
== 29992 ==
DvMain。版本6.0构建38B16
vex x86-> IR:未处理的指令字节:0xC4 0xE2 0x7B 0xF7
== 29992 == valgrind:地址0x5f37a4b处无法识别的指令。
== 29992 == at 0x5F37A4B:ACE_Select_Reactor_Impl :: bit_ops(int,unsigned long,ACE_Select_Reactor_Handle_Set&,int)(位于/usr/local/dvstation/lib3p/ACE/libACE.so.6.2.7)
a> 建议使用 -mno-avx
禁用AVX指令,这对一些事情起作用。但是,仍然有问题。
我试过 -mno-sse2avx -mno-avx -mno-sse4.1 -mno-sse4。 2 -mno-sse4 -mno-sse4a
但Valgrind仍然抱怨 :: bit_ops()
中的vex指令(如果您有兴趣, bit_ops
定义在该文件的第956行)
如何完全禁用VEX指令的生成,以便我可以使用Valgrind来调试吗?
平台是32位Centos 6,g ++ 4.9.4
$ b $(请不要t建议移动到64位,这不是一个选项)
参考:
编译行对于违规文件:
/usr/local/gcc-4.9.4/bin/c++4.9 -mno-sse2avx - fvisibility = hidden
-fvisibility-inlines-hidden -fdiagnostics-color = auto
-mno-avx -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-ss e4a
-O3 -march = native -pthread -fno-strict-aliasing
-Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE
-c -fPIC -o .shobj / Select_Reactor_Base。 Select_Reactor_Base.cpp
VEX非常新颖。使用旧的架构,例如 -march = pentium4
将禁止VEX指令编码,但您保留SSE2。
We are debugging memory issues with our large legacy app and would like to use Valgrind to track it down. The app uses the ACE/TAO CORBA library however, Valgrind complains of illegal "vex" instructions in the library.
==29992== Memcheck, a memory error detector
==29992== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==29992== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==29992== Command: DvMain
==29992==
DvMain. Version 6.0 Build 38B16
vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x7B 0xF7
==29992== valgrind: Unrecognised instruction at address 0x5f37a4b.
==29992== at 0x5F37A4B: ACE_Select_Reactor_Impl::bit_ops(int, unsigned long, ACE_Select_Reactor_Handle_Set&, int) (in /usr/local/dvstation/lib3p/ACE/libACE.so.6.2.7)
In another SO question, VTT suggested disabling AVX instructions with -mno-avx
, which worked on some things. However, still have problems.
I've tried -mno-sse2avx -mno-avx -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a
but Valgrind still complains of vex instructions in ::bit_ops()
(If you are interested, bit_ops
is defined on line 956 of this file)
How do I disable completely the generation of VEX instructions so I can use Valgrind to debug?
Platform is 32-bit Centos 6, g++ 4.9.4
(please don't suggest moving to 64-bit. That's not an option with this product)
Reference:
Compile line for offending file:
/usr/local/gcc-4.9.4/bin/c++4.9 -mno-sse2avx -fvisibility=hidden
-fvisibility-inlines-hidden -fdiagnostics-color=auto
-mno-avx -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a
-O3 -march=native -pthread -fno-strict-aliasing
-Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE
-c -fPIC -o .shobj/Select_Reactor_Base.o Select_Reactor_Base.cpp
VEX is pretty new. Using an old architecture, e.g. -march=pentium4
will disallow VEX instruction coding, but you keep SSE2.
这篇关于gcc / C ++禁用生成vex指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!