Bug 212511

Summary: unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC8 0xB8
Product: [Developer tools] valgrind Reporter: manolis <manolis>
Component: callgrindAssignee: Josef Weidendorfer <josef.weidendorfer>
Status: RESOLVED DUPLICATE    
Severity: crash CC: ashl1future, jseward, khaeming
Priority: NOR    
Version: 3.5.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description manolis 2009-10-31 13:34:42 UTC
I wrote a kde/qt project and it gives me with:
valgrind -v --tool=callgrind ./kade

this:
unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC8 0xB8

using amd_64 platform gentoo-linux
Comment 1 manolis 2009-10-31 22:08:25 UTC
vex amd64->IR: unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC8 0xB8                                  
==4932== valgrind: Unrecognised instruction at address 0x9f37ae7.  
........
==4932== Process terminating with default action of signal 4 (SIGILL)                                     
==4932==  Illegal opcode at address 0x9F37AE7                                                             
==4932==    at 0x9F37AE7: ??? (in /usr/lib64/libglib-2.0.so.0.2200.2)     

So i did a:
objdump -d /usr/lib64/libglib-2.0.so.0.2200.2 | grep "f3 48 0f bd"
and it gave me:

  6622a:       f3 48 0f bd c8          lzcnt  %rax,%rcx
   66ae7:       f3 48 0f bd c8          lzcnt  %rax,%rcx
   8110a:       f3 48 0f bd c7          lzcnt  %rdi,%rax

but nothing if I run with grep "f3 48 0f bd c8 b8"

Maybe the above helps :-)
Comment 2 manolis 2009-10-31 23:14:35 UTC
I tried to compile glib with -O2 and now it works but
my app crashes with :

vex amd64->IR: unhandled instruction bytes: 0xF3 0x41 0xF 0xB8 0x52 0xC 
and I cannot find anything in the executable file with objdump
Comment 3 manolis 2009-11-01 14:35:00 UTC
I found the last bytes to be opcode:

f3 41 0f b8 52 0c       popcnt 0xc(%r10),%edx

in /usr/lib64/libfontconfig.so.1.4.3
Comment 4 khaeming 2009-12-30 15:25:55 UTC
This bug occurs on my machine, too.

Valgrind-3.5.0 and LibVEX
vex amd64->IR: unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC8 0xB8

==29709== Process terminating with default action of signal 4 (SIGILL)
==29709==  Illegal opcode at address 0x818DFC0
==29709==    at 0x818DFC0: ??? (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x818F688: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x814DEDC: g_array_sized_new (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x819A2E8: g_static_private_set (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x815AEC2: g_get_filename_charsets (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x815AF2D: ??? (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x819A55B: g_thread_init_glib (in /usr/lib64/libglib-2.0.so.0.2000.5)
==29709==    by 0x7A69956: QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) (in /usr/lib64/qt4/libQtCore.so.4.5.3)
==29709==    by 0x57CDCAA: ??? (in /usr/lib64/qt4/libQtGui.so.4.5.3)
==29709==    by 0x57CDD5F: ??? (in /usr/lib64/qt4/libQtGui.so.4.5.3)
==29709==    by 0x579DE01: QApplicationPrivate::createEventDispatcher() (in /usr/lib64/qt4/libQtGui.so.4.5.3)
==29709==    by 0x7A46B81: QCoreApplication::init() (in /usr/lib64/qt4/libQtCore.so.4.5.3)

As in the first post, this is also a qt project, version is qt-4.5.3
glib version is 2.20.5
glib has been compiled using
CFLAGS="-O2 -march=amdfam10 -pipe -fomit-frame-pointer"
Comment 5 Alexey Shildyakov 2010-09-23 23:03:46 UTC
I don't know is it related, but I have a similar problem with linuxdcpp:

vex amd64->IR: unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC0 0x41
==7924== valgrind: Unrecognised instruction at address 0x6e5ed48.

==7924== Process terminating with default action of signal 4 (SIGILL)
==7924==  Illegal opcode at address 0x6E5ED48
==7924==    at 0x6E5ED48: slab_allocator_alloc_chunk (gutils.h:358)
==7924==    by 0x6E5F4C2: g_slice_alloc (gslice.c:673)
==7924==    by 0x6E1BEBC: g_array_sized_new (garray.c:187)
==7924==    by 0x6E6ABD0: g_static_private_set (gthread.c:1697)
==7924==    by 0x6E29E2A: g_get_filename_charsets (gconvert.c:1199)
==7924==    by 0x6E29EAD: _g_convert_thread_init (gconvert.c:1304)
==7924==    by 0x6E6B399: g_thread_init_glib (gthread.c:937)
==7924==    by 0x5A5FAB: main (wulfor.cc:65)
==7924== Invalid free() / delete / delete[]
==7924==    at 0x4C25A2D: free (vg_replace_malloc.c:325)
==7924==    by 0x7740A3A: ??? (in /lib64/libc-2.12.1.so)
==7924==    by 0x77405D1: ??? (in /lib64/libc-2.12.1.so)
==7924==    by 0x4A2060C: _vgnU_freeres (vg_preloaded.c:62)
==7924==    by 0x76C9B84: opendir (opendir.c:119)
==7924==    by 0x4A9F60: ShareManager::buildTree(std::string const&, ShareManager::Directory*
) (ShareManager.cpp:587)
==7924==    by 0x4AA6B0: ShareManager::buildTree(std::string const&, ShareManager::Directory*
) (ShareManager.cpp:696)
==7924==    by 0x4AB0BA: ShareManager::run() (ShareManager.cpp:801)
==7924==    by 0x4C9C89: Thread::starter(void*) (Thread.h:137)
==7924==    by 0x4E32C39: start_thread (pthread_create.c:301)
==7924==    by 0x76FDA9C: clone (clone.S:115)
==7924==  Address 0x4061ed0 is not stack'd, malloc'd or (recently) free'd
==7924==

AMD Athlon II x4

objdump -d /usr/lib64/libglib-2.0.so.0.2400.2 | grep "f3 48 0f bd" 
   5b5a8:       f3 48 0f bd d2          lzcnt  %rdx,%rdx
   5bd48:       f3 48 0f bd c0          lzcnt  %rax,%rax
   7390a:       f3 48 0f bd ff          lzcnt  %rdi,%rdi

Valgrind 3.5.0

CFLAGS="-march=amdfam10 -O2 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
Comment 6 Alexey Shildyakov 2010-09-23 23:31:12 UTC
It is duplicate of bug 212335
Comment 7 Julian Seward 2010-10-07 18:25:42 UTC

*** This bug has been marked as a duplicate of bug 212335 ***