Bug 342192

Summary: Unhandled instruction on OS X 10.9 in libsystem_m.dylib
Product: [Developer tools] valgrind Reporter: Dawid Drechny <dawid.drechny>
Component: memcheckAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dawid.drechny, rhyskidd
Priority: NOR    
Version: 3.10 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dawid Drechny 2014-12-24 13:09:50 UTC
==64128== Memcheck, a memory error detector
==64128== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==64128== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info
==64128== Command: ../test
==64128==
vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0xB
==64128== valgrind: Unrecognised instruction at address 0xa95c1d6.
==64128==    at 0xA95C1D6: trunc$fenv_access_off (in /usr/lib/system/libsystem_m.dylib)
==64128==    by 0x14D7326: (censored)
==64128==    by 0x14D55FF: (censored)
==64128==    by 0x14D577F: (censored)
==64128==    by 0x1485258: (censored)
==64128==    by 0x148544B: (censored)
==64128==    by 0x8FE1345A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==64128==    by 0x8FE135C3: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==64128==    by 0x8FE0F92B: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==64128==    by 0x8FE0F7BB: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==64128==    by 0x8FE0205D: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==64128==    by 0x8FE05827: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==64128== Your program just tried to execute an instruction that Valgrind
==64128== did not recognise.  There are two possible reasons for this.
==64128== 1. Your program has a bug and erroneously jumped to a non-code
==64128==    location.  If you are running Memcheck and you just saw a
==64128==    warning about a bad jump, it's probably your program's fault.
==64128== 2. The instruction is legitimate but Valgrind doesn't handle it,
==64128==    i.e. it's Valgrind's fault.  If you think this is the case or
==64128==    you are not sure, please let us know and we'll try to fix it.
==64128== Either way, Valgrind will now raise a SIGILL signal which will
==64128== probably kill your program.
==64128==
==64128== Process terminating with default action of signal 4 (SIGILL)
==64128==  Illegal opcode at address 0xA95C1D6
==64128==    at 0xA95C1D6: trunc$fenv_access_off (in /usr/lib/system/libsystem_m.dylib)
==64128==    by 0x14D7326: (censored)
==64128==    by 0x14D55FF: (censored)
==64128==    by 0x14D577F: (censored)
==64128==    by 0x1485258: (censored)
==64128==    by 0x148544B: (censored)
==64128==    by 0x8FE1345A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==64128==    by 0x8FE135C3: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==64128==    by 0x8FE0F92B: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==64128==    by 0x8FE0F7BB: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==64128==    by 0x8FE0205D: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==64128==    by 0x8FE05827: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==64128==
==64128== HEAP SUMMARY:
==64128==     in use at exit: 245,181 bytes in 1,570 blocks
==64128==   total heap usage: 2,868 allocs, 1,298 frees, 409,318 bytes allocated
==64128==
==64128== LEAK SUMMARY:
==64128==    definitely lost: 2,288 bytes in 47 blocks
==64128==    indirectly lost: 22,276 bytes in 111 blocks
==64128==      possibly lost: 82,616 bytes in 168 blocks
==64128==    still reachable: 113,010 bytes in 735 blocks
==64128==         suppressed: 24,991 bytes in 509 blocks
==64128== Rerun with --leak-check=full to see details of leaked memory
==64128==
==64128== For counts of detected and suppressed errors, rerun with: -v
==64128== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
Illegal instruction: 4

Reproducible: Always
Comment 1 Rhys Kidd 2015-03-07 09:11:40 UTC
Hi Dawid Drechny - are you able to provide ./test or a reduced test case so that developers can reproduce this unhandled instruction?
I haven't seen it via the Valgrind regression test suite for instance, so hard to track down.
Comment 2 Rhys Kidd 2015-05-13 12:31:18 UTC
Actually, this is a dup of the report: https://bugs.kde.org/show_bug.cgi?id=346023
Comment 3 Rhys Kidd 2015-05-21 14:09:23 UTC

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