https://bugs.kde.org/show_bug.cgi?id=444399

Hans Kratz <h...@appfour.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |h...@appfour.com

--- Comment #3 from Hans Kratz <h...@appfour.com> ---
This seems to be bug in valgrind. Support for some ld*p instructions (which are
ARMv8.0) is not implemented. Simple reproducer in C++ for stxp:
--- snip ---
#include <atomic>

int main() {
    std::atomic<__int128_t> x;
    x.store(23, std::memory_order_relaxed);
}
--- snip ---

$ clang++-12 main.cxx -o main
$ valgrind ./main
==25164== Memcheck, a memory error detector
==25164== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25164== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==25164== Command: ./main
==25164==
ARM64 front end: load_store
disInstr(arm64): unhandled instruction 0xC87F3168
disInstr(arm64): 1100'1000 0111'1111 0011'0001 0110'1000
==25164== valgrind: Unrecognised instruction at address 0x400690.
==25164==    at 0x400690: std::atomic<__int128>::store(__int128,
std::memory_order) (in /data/dev/clangtest/main)
==25164==    by 0x4005F7: main (in /data/dev/clangtest/main)
==25164== Your program just tried to execute an instruction that Valgrind
==25164== did not recognise.  There are two possible reasons for this.
==25164== 1. Your program has a bug and erroneously jumped to a non-code
==25164==    location.  If you are running Memcheck and you just saw a
==25164==    warning about a bad jump, it's probably your program's fault.
==25164== 2. The instruction is legitimate but Valgrind doesn't handle it,
==25164==    i.e. it's Valgrind's fault.  If you think this is the case or
==25164==    you are not sure, please let us know and we'll try to fix it.
==25164== Either way, Valgrind will now raise a SIGILL signal which will
==25164== probably kill your program.
==25164==
==25164== Process terminating with default action of signal 4 (SIGILL)
==25164==  Illegal opcode at address 0x400690
==25164==    at 0x400690: std::atomic<__int128>::store(__int128,
std::memory_order) (in /data/dev/clangtest/main)
==25164==    by 0x4005F7: main (in /data/dev/clangtest/main)
==25164==
==25164== HEAP SUMMARY:
==25164==     in use at exit: 0 bytes in 0 blocks
==25164==   total heap usage: 1 allocs, 1 frees, 72,704 bytes allocated
==25164==
==25164== All heap blocks were freed -- no leaks are possible
==25164==
==25164== For lists of detected and suppressed errors, rerun with: -s
==25164== 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.

Reply via email to