On Fri, Mar 16, 2018 at 2:23 PM, John Reiser <jrei...@bitwagon.com> wrote:

> 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.
>

$ ldd ./a.out
        libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7e20000)

$ strings /usr/lib32/libstdc++.so.6 | grep GCC:
GCC: (GNU) 7.2.1 20171224
GCC: (GNU) 7.2.1 20171215

$ g++ --version
g++ (GCC) 7.2.1 20171224

I have also upgraded to GCC 7.3.0, with the exact same result.

On Fri, Mar 16, 2018 at 3:11 PM, John Reiser <jrei...@bitwagon.com> wrote:

> 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.
>>
>
> Also fixed in https://bugs.kde.org/show_bug.cgi?id=384230


Appreciated. Thanks!
------------------------------------------------------------------------------
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