| Summary: | Valgind/memcheck doesn't handle stlur instruction in ARM64/aarch64 | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Rob Bresalier <rob.bresalier> |
| Component: | memcheck | Assignee: | Paul Floyd <pjfloyd> |
| Status: | REPORTED --- | ||
| Severity: | crash | CC: | pjfloyd, rob.bresalier |
| Priority: | NOR | ||
| Version First Reported In: | 3.24 GIT | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Rob Bresalier
2024-11-19 22:03:04 UTC
Below are the contents of atomic_base.h around line 725 where the crash occurs.
It is trying to execute "__atomic_store_n(&_M_p, __p, int(__m));"
I think this translates to the "stlur" instruction:
715 _GLIBCXX_ALWAYS_INLINE void
716 store(__pointer_type __p,
717 memory_order __m = memory_order_seq_cst) noexcept
718 {
719 memory_order __b = __m & __memory_order_mask;
720
721 __glibcxx_assert(__b != memory_order_acquire);
722 __glibcxx_assert(__b != memory_order_acq_rel);
723 __glibcxx_assert(__b != memory_order_consume);
724
725 __atomic_store_n(&_M_p, __p, int(__m));
726 }
The atomic_base.h file comes from gcc version 10.5.0, located at path: usr/include/c++/10.5.0/bits/atomic_base.h What hardware is this on? And what compiler flags are you using? It is an ARM Neoverse N2 CPU core, cn106 variant. See: https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-octeon-10-dpu-platform-product-brief.pdf I'll get back to you about compiler flags tomorrow, I have the day off today. The output of /proc/cpuinfo is: processor : 0 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 1 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 2 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 3 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 4 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 5 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 6 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 7 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 8 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 9 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 10 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 11 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 12 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 13 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 14 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 processor : 15 BogoMIPS : 2000.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd49 CPU revision : 0 2 main compiler flags that are likely most important: -mcpu=neoverse-n2 -march=armv8.5-a+crypto Compiler version info: $ /opt/WR/WindRiverLinux-21-240903/wr21-toolchain/bin/aarch64-cn10k-linux-g++ --version aarch64-cn10k-linux-g++ (GCC) 10.5.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Here is the full compile command line with all the compiler flags: /opt/WR/WindRiverLinux-21-240903/wr21-toolchain/bin/aarch64-cn10k-linux-g++ --sysroot=/opt/WR/WindRiverLinux-21-240903/wrlinux-cn10k/sysroots/neoversen2-crypto-cn10k-linux -DGOOGLE_PROTOBUF_CMAKE_BUILD -DLIBPROTOBUF_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotobuf_EXPORTS -I/home/user/workspace/mdt_assets/wr21_cn106.build/grpc-prefix/src/grpc-build/third_party/protobuf -I/home/user/workspace/mdt_assets/grpc/third_party/protobuf/src -I/home/user/workspace/mdt_assets/grpc/third_party/protobuf/third_party/utf8_range -isystem /home/user/workspace/mdt_stage/wr21_cn106.stage/usr/local/include -mcpu=neoverse-n2 -march=armv8.5-a+crypto -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -fPIC -fno-omit-frame-pointer -funwind-tables -fdata-sections -ffunction-sections -ffile-prefix-map=/home/user/workspace/= -fcoroutines -DAGRPC_BOOST_ASIO -DHAVE_CPP_STDLIB -Wno-psabi -Wno-misleading-indentation -O2 -ggdb -std=gnu++2a -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o -MF third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o.d -o third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o -c /home/user/workspace/mdt_assets/grpc/third_party/protobuf/src/google/protobuf/descriptor.c |