When I compile this simple C++ program as a 32-bit executable on a 64-bit linux:

#include <iostream>
int main() {
         std::cout << "Hello, World!" << std::endl;
         return 0;
}

Using the -m32 option:

g++ -m32 out.cpp

Valgrind chokes on an supposedly illegal instruction:

vex x86->IR: unhandled instruction bytes: 0x67 0xE8 0x7D 0xFF
==18453== valgrind: Unrecognised instruction at address 0x48cc63d.
==18453==    at 0x48CC63D: std::locale::locale() (locale_init.cc:250)

Thank you for stating the versions valgrind-3.13.0 and Linux lnx 4.14.12-1-ARCH.
However you omitted two important versions: "g++ --version"
and the flavor and version of the runtime library containing locale_init.cc
which is where the unhandled instruction bytes occur.

The code 0x67 0xE8 0x7D 0xFF is "addr32 callq ...".  Valgrind is complaining
about the 'addr32' opcode prefix.  The compiler for locale_init.cc did a
not-so-good job.  The addr32 prefix is a total waste; remove it.

Re-compile locale_init.cc with a better compiler.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to