I am trying to find a memory leak in a large C++ program which utilizes multiple shared libraries.
Unfortunately, valgrind fails with "unhandled instruction bytes: 0xC5 0xF9 0x6E 0x45" It says the illegal instruction is inside std::tr1::__detail, inside a standard library... Is there anything I can do about this? I've posted the valgrind output and platform information below. Thanks! VALGRIND OUTPUT > ==18984== Memcheck, a memory error detector > ==18984== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. > ==18984== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info > ==18984== Command: ./DvMain > ==18984== > vex x86->IR: unhandled instruction bytes: 0xC5 0xF9 0x6E 0x45 > ==18984== valgrind: Unrecognised instruction at address 0x406ae5a. > ==18984== at 0x406AE5A: > std::tr1::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned int) const > (hashtable_policy.h:460) > ==18984== by 0x4353724: std::tr1::_Hashtable<DvDbDataBaseObject*, > DvDbDataBaseObject*, std::allocator<DvDbDataBaseObject*>, > std::_Identity<DvDbDataBaseObject*>, equalp<DvDbDataBaseObject>, > DvDbDataBaseObject::Hash, std::tr1::__detail::_Mod_range_hashing, > std::tr1::__detail::_Default_ranged_hash, > std::tr1::__detail::_Prime_rehash_policy, false, true, > true>::_Hashtable(unsigned int, DvDbDataBaseObject::Hash const&, > std::tr1::__detail::_Mod_range_hashing const&, > std::tr1::__detail::_Default_ranged_hash const&, equalp<DvDbDataBaseObject> > const&, std::_Identity<DvDbDataBaseObject*> const&, > std::allocator<DvDbDataBaseObject*> const&) (hashtable:590) > ==18984== by 0x4352D81: std::tr1::__unordered_set<DvDbDataBaseObject*, > DvDbDataBaseObject::Hash, equalp<DvDbDataBaseObject>, > std::allocator<DvDbDataBaseObject*>, false>::__unordered_set(unsigned int, > DvDbDataBaseObject::Hash const&, equalp<DvDbDataBaseObject> const&, > std::allocator<DvDbDataBaseObject*> const&) (unordered_set:70) > ==18984== by 0x4352734: std::tr1::unordered_set<DvDbDataBaseObject*, > DvDbDataBaseObject::Hash, equalp<DvDbDataBaseObject>, > std::allocator<DvDbDataBaseObject*> >::unordered_set(unsigned int, > DvDbDataBaseObject::Hash const&, equalp<DvDbDataBaseObject> const&, > std::allocator<DvDbDataBaseObject*> const&) (unordered_set:198) > ==18984== by 0x584F672: __static_initialization_and_destruction_0(int, > int) (DvDbIPSystemOpModeSettings.cpp:22) > ==18984== by 0x584F70E: global constructors keyed to > DvDbIPSystemOpModeSettings.cpp (DvDbIPSystemOpModeSettings.cpp:68) > ==18984== by 0x584FCFC: ??? (in > /usr/local/dvstation/lib/libdvdbip.so.6.0-27) > ==18984== by 0x57EE103: ??? (in > /usr/local/dvstation/lib/libdvdbip.so.6.0-27) > ==18984== by 0x49E26FFE: _dl_init (in /lib/ld-2.12.so) > ==18984== by 0x49E1888E: ??? (in /lib/ld-2.12.so) > ==18984== Your program just tried to execute an instruction that Valgrind > ==18984== did not recognise. There are two possible reasons for this. > ==18984== 1. Your program has a bug and erroneously jumped to a non-code > ==18984== location. If you are running Memcheck and you just saw a > ==18984== warning about a bad jump, it's probably your program's fault. > ==18984== 2. The instruction is legitimate but Valgrind doesn't handle it, > ==18984== i.e. it's Valgrind's fault. If you think this is the case or > ==18984== you are not sure, please let us know and we'll try to fix it. > ==18984== Either way, Valgrind will now raise a SIGILL signal which will > ==18984== probably kill your program. > ==18984== > ==18984== Process terminating with default action of signal 4 (SIGILL) > ==18984== Illegal opcode at address 0x406AE5A > ==18984== at 0x406AE5A: > std::tr1::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned int) const > (hashtable_policy.h:460) > ==18984== by 0x4353724: std::tr1::_Hashtable<DvDbDataBaseObject*, > DvDbDataBaseObject*, std::allocator<DvDbDataBaseObject*>, > std::_Identity<DvDbDataBaseObject*>, equalp<DvDbDataBaseObject>, > DvDbDataBaseObject::Hash, std::tr1::__detail::_Mod_range_hashing, > std::tr1::__detail::_Default_ranged_hash, > std::tr1::__detail::_Prime_rehash_policy, false, true, > true>::_Hashtable(unsigned int, DvDbDataBaseObject::Hash const&, > std::tr1::__detail::_Mod_range_hashing const&, > std::tr1::__detail::_Default_ranged_hash const&, equalp<DvDbDataBaseObject> > const&, std::_Identity<DvDbDataBaseObject*> const&, > std::allocator<DvDbDataBaseObject*> const&) (hashtable:590) > ==18984== by 0x4352D81: std::tr1::__unordered_set<DvDbDataBaseObject*, > DvDbDataBaseObject::Hash, equalp<DvDbDataBaseObject>, > std::allocator<DvDbDataBaseObject*>, false>::__unordered_set(unsigned int, > DvDbDataBaseObject::Hash const&, equalp<DvDbDataBaseObject> const&, > std::allocator<DvDbDataBaseObject*> const&) (unordered_set:70) > ==18984== by 0x4352734: std::tr1::unordered_set<DvDbDataBaseObject*, > DvDbDataBaseObject::Hash, equalp<DvDbDataBaseObject>, > std::allocator<DvDbDataBaseObject*> >::unordered_set(unsigned int, > DvDbDataBaseObject::Hash const&, equalp<DvDbDataBaseObject> const&, > std::allocator<DvDbDataBaseObject*> const&) (unordered_set:198) > ==18984== by 0x584F672: __static_initialization_and_destruction_0(int, > int) (DvDbIPSystemOpModeSettings.cpp:22) > ==18984== by 0x584F70E: global constructors keyed to > DvDbIPSystemOpModeSettings.cpp (DvDbIPSystemOpModeSettings.cpp:68) > ==18984== by 0x584FCFC: ??? (in > /usr/local/dvstation/lib/libdvdbip.so.6.0-27) > ==18984== by 0x57EE103: ??? (in > /usr/local/dvstation/lib/libdvdbip.so.6.0-27) > ==18984== by 0x49E26FFE: _dl_init (in /lib/ld-2.12.so) > ==18984== by 0x49E1888E: ??? (in /lib/ld-2.12.so) > ==18984== > ==18984== HEAP SUMMARY: > ==18984== in use at exit: 49,009 bytes in 864 blocks > ==18984== total heap usage: 922 allocs, 58 frees, 118,931 bytes allocated > ==18984== > ==18984== LEAK SUMMARY: > ==18984== definitely lost: 0 bytes in 0 blocks > ==18984== indirectly lost: 0 bytes in 0 blocks > ==18984== possibly lost: 0 bytes in 0 blocks > ==18984== still reachable: 49,009 bytes in 864 blocks > ==18984== of which reachable via heuristic: > ==18984== stdstring : 948 bytes in 48 blocks > ==18984== suppressed: 0 bytes in 0 blocks > ==18984== Rerun with --leak-check=full to see details of leaked memory > ==18984== > ==18984== For counts of detected and suppressed errors, rerun with: -v > ==18984== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 156 from 8) > Illegal instruction PLATFORM INFORMATION > $ uname -a > Linux 3.10.80-1.el6.elrepo.i686 #1 SMP Sun Jun 7 08:15:14 EDT 2015 i686 i686 > i386 GNU/Linux > > $ cat /etc/redhat-release > CentOS release 6.6 (Final) > > $ cat /proc/cpuinfo > processor : 0 > vendor_id : GenuineIntel > cpu family : 6 > model : 60 > model name : Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz > stepping : 3 > microcode : 0x1a > cpu MHz : 3600.000 > cache size : 3072 KB > physical id : 0 > siblings : 4 > core id : 0 > cpu cores : 2 > apicid : 0 > initial apicid : 0 > fdiv_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 13 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp > lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf > eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr > pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c > rdrand lahf_lm abm arat xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority > ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > bogomips : 7199.60 > clflush size : 64 > cache_alignment : 64 > address sizes : 39 bits physical, 48 bits virtual > power management: > > processor : 1 > vendor_id : GenuineIntel > cpu family : 6 > model : 60 > model name : Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz > stepping : 3 > microcode : 0x1a > cpu MHz : 3600.000 > cache size : 3072 KB > physical id : 0 > siblings : 4 > core id : 1 > cpu cores : 2 > apicid : 2 > initial apicid : 2 > fdiv_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 13 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp > lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf > eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr > pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c > rdrand lahf_lm abm arat xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority > ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > bogomips : 7199.60 > clflush size : 64 > cache_alignment : 64 > address sizes : 39 bits physical, 48 bits virtual > power management: > > processor : 2 > vendor_id : GenuineIntel > cpu family : 6 > model : 60 > model name : Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz > stepping : 3 > microcode : 0x1a > cpu MHz : 3600.421 > cache size : 3072 KB > physical id : 0 > siblings : 4 > core id : 0 > cpu cores : 2 > apicid : 1 > initial apicid : 1 > fdiv_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 13 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp > lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf > eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr > pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c > rdrand lahf_lm abm arat xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority > ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > bogomips : 7199.60 > clflush size : 64 > cache_alignment : 64 > address sizes : 39 bits physical, 48 bits virtual > power management: > > processor : 3 > vendor_id : GenuineIntel > cpu family : 6 > model : 60 > model name : Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz > stepping : 3 > microcode : 0x1a > cpu MHz : 3600.703 > cache size : 3072 KB > physical id : 0 > siblings : 4 > core id : 1 > cpu cores : 2 > apicid : 3 > initial apicid : 3 > fdiv_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 13 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov > pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp > lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf > eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr > pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c > rdrand lahf_lm abm arat xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority > ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid > bogomips : 7199.60 > clflush size : 64 > cache_alignment : 64 > address sizes : 39 bits physical, 48 bits virtual > power management:
------------------------------------------------------------------------------
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users