Bug 347198

Summary: vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0x63 (pcmpistri)
Product: [Developer tools] valgrind Reporter: Oscar Gomez <oscar.a.gomez>
Component: vexAssignee: Julian Seward <jseward>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: oscar.a.gomez, rhyskidd
Priority: NOR    
Version: 3.10 SVN   
Target Milestone: ---   
Platform: Android   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=332917
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oscar Gomez 2015-05-04 23:45:36 UTC
vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0x63
==5187== valgrind: Unrecognised instruction at address 0x6d8bf37.
==5187==    at 0x6D8BF37: __intel_sse4_strlen (in /system/lib/libintlc.so)
==5187==    by 0x55649E1: android::camera2::Aiq3A::_init3A() (Aiq3A.cpp:205)
==5187==    by 0x55128F3: android::camera2::Camera3HAL::init() (Camera3HAL.cpp:184)
==5187==    by 0x558F2FA: openCameraHardware(int, hw_module_t const*, hw_device_t**) (Camera3HALModule.h:80)
==5187==    by 0x558FC9D: hal_dev_open(hw_module_t const*, char const*, hw_device_t**) (Camera3HALModule.h:157)
==5187==    by 0x4A35E67: android::Camera3Device::initialize(camera_module*) (in /system/lib/libcameraservice.so)
==5187==    by 0x127800: android::camera2::tests::CameraModuleTest_LoadModule_Test::TestBody() (CameraModuleTests.cpp:51)
==5187==    by 0x156399: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) [clone .isra.366] [clone .constprop.499] (gtest.cc:2078)
==5187== Your program just tried to execute an instruction that Valgrind
==5187== did not recognise.  There are two possible reasons for this. 
==5187== 1. Your program has a bug and erroneously jumped to a non-code
==5187==    location.  If you are running Memcheck and you just saw a 
==5187==    warning about a bad jump, it's probably your program's fault.
==5187== 2. The instruction is legitimate but Valgrind doesn't handle it,
==5187==    i.e. it's Valgrind's fault.  If you think this is the case or
==5187==    you are not sure, please let us know and we'll try to fix it.
==5187== Either way, Valgrind will now raise a SIGILL signal which will
==5187== probably kill your program.


Reproducible: Always
Comment 1 Oscar Gomez 2015-05-04 23:49:48 UTC
Seems to be this C instruction from sse4_2: _mm_cmpistri
Comment 2 Rhys Kidd 2015-05-31 23:53:14 UTC
pcmpistri is an SSE4.2 instruction.
SSE4 isn't supported in 32 bit mode, only 64 bit mode.  32 bit mode supports only up to and including SSSE3.
http://www.valgrind.org/docs/manual/manual-core.html#manual-core.limits

There are no current plans to support SSE4 on 32-bit.  Please use 64-bit.