https://bugs.kde.org/show_bug.cgi?id=384230
Steve Folta <st...@folta.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |st...@folta.net --- Comment #5 from Steve Folta <st...@folta.net> --- I had the same problem when using the ifstream constructor, ONLY when using "-m32". The patch (107639) does fix it. (However, the bug as reported -- on dl_main() with a super-minimal main() -- did not occur for me.) Pardon my ignorance, but why isn't that patch in Git already? Here's my test case: $ cat main.cpp #include <fstream> int main(int argc, char* argv[]) { std::ifstream file(argv[1], std::ios_base::in); return 0; } $ cat Makefile test: main.cpp g++ -g -m32 -o $@ $^ $ valgrind test test.txt ==7628== Memcheck, a memory error detector ==7628== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==7628== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==7628== Command: test test.txt ==7628== vex x86->IR: unhandled instruction bytes: 0x67 0xE8 0x7D 0xFF ==7628== valgrind: Unrecognised instruction at address 0x48eb53d. ==7628== at 0x48EB53D: std::locale::locale() (locale_init.cc:250) ==7628== by 0x4940A26: basic_ios (basic_ios.h:462) ==7628== by 0x4940A26: std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(char const*, std::_Ios_Openmode) (fstream:496) ==7628== by 0x1086B0: main (main.cpp:6) ==7628== Your program just tried to execute an instruction that Valgrind ==7628== did not recognise. There are two possible reasons for this. ==7628== 1. Your program has a bug and erroneously jumped to a non-code ==7628== location. If you are running Memcheck and you just saw a ==7628== warning about a bad jump, it's probably your program's fault. ==7628== 2. The instruction is legitimate but Valgrind doesn't handle it, ==7628== i.e. it's Valgrind's fault. If you think this is the case or ==7628== you are not sure, please let us know and we'll try to fix it. ==7628== Either way, Valgrind will now raise a SIGILL signal which will ==7628== probably kill your program. ==7628== ==7628== Process terminating with default action of signal 4 (SIGILL): dumping core ==7628== Illegal opcode at address 0x48EB53D ==7628== at 0x48EB53D: std::locale::locale() (locale_init.cc:250) ==7628== by 0x4940A26: basic_ios (basic_ios.h:462) ==7628== by 0x4940A26: std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(char const*, std::_Ios_Openmode) (fstream:496) ==7628== by 0x1086B0: main (main.cpp:6) ==7628== ==7628== HEAP SUMMARY: ==7628== in use at exit: 0 bytes in 0 blocks ==7628== total heap usage: 1 allocs, 1 frees, 18,944 bytes allocated ==7628== ==7628== All heap blocks were freed -- no leaks are possible ==7628== ==7628== For counts of detected and suppressed errors, rerun with: -v ==7628== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Illegal instruction (core dumped) -- You are receiving this mail because: You are watching all bug changes.