https://bugs.kde.org/show_bug.cgi?id=496477
Bug ID: 496477 Summary: Valgind/memcheck doesn't handle stlur instruction in ARM64/aarch64 Classification: Developer tools Product: valgrind Version: 3.24 GIT Platform: Other OS: Linux Status: REPORTED Severity: crash Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: rob.bresal...@nokia.com Target Milestone: --- SUMMARY When I run my application under valgrind/memcheck on ARM64 architecture under Wind River Linux I get a SIGILL on "stlur" instruction. The backtrace with "--sigill-diagnostics=yes" shows: disInstr(arm64): unhandled instruction 0xD905001F Using an online instruction decoder: https://armconverter.com/?disasm&code=1F0005D9 Shows that the offending instruction is: stlur xzr, [x0, #0x50] The encoding and description of this instruction may be found here: https://developer.arm.com/documentation/ddi0602/2024-09/Base-Instructions/STLUR--Store-release-register--unscaled-- STEPS TO REPRODUCE I ran under valgrind using command line: exec valgrind --sigill-diagnostics=yes --show-mismatched-frees=no --leak-check=full --show-possibly-lost=no --undef-value-errors=no --error-limit=no EquipApp The application "EquipApp" is a proprietary application that can't be shared and requires a proprietary circuit pack to run. OBSERVED RESULT 2024-11-19T01:23:06.536Z ARM64 front end: load_store 2024-11-19T01:23:14.010Z disInstr(arm64): unhandled instruction 0xD905001F 2024-11-19T01:23:14.015Z disInstr(arm64): 1101'1001 0000'0101 0000'0000 0001'1111 2024-11-19T01:23:14.020Z ==3454== valgrind: Unrecognised instruction at address 0xbee5cc4. 2024-11-19T01:23:14.026Z ==3454== at 0xBEE5CC4: store (atomic_base.h:725) 2024-11-19T01:23:14.030Z ==3454== by 0xBEE5CC4: operator= (atomic_base.h:632) 2024-11-19T01:23:14.035Z ==3454== by 0xBEE5CC4: operator= (atomic:392) 2024-11-19T01:23:14.040Z ==3454== by 0xBEE5CC4: google::protobuf::DescriptorBuilder::BuildFieldOrExtension(google::protobuf::FieldDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::FieldDescriptor*, bool, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6493) 2024-11-19T01:23:14.064Z ==3454== by 0xBEE8A03: BuildField (descriptor.cc:4224) 2024-11-19T01:23:14.069Z ==3454== by 0xBEE8A03: google::protobuf::DescriptorBuilder::BuildMessage(google::protobuf::DescriptorProto const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor*, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6040) 2024-11-19T01:23:14.089Z ==3454== by 0xBEEC1F7: google::protobuf::DescriptorBuilder::BuildFileImpl(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&) (descriptor.cc:5874) 2024-11-19T01:23:14.104Z ==3454== by 0xBEEDCD3: google::protobuf::DescriptorBuilder::BuildFile(google::protobuf::FileDescriptorProto const&) (descriptor.cc:5632) 2024-11-19T01:23:14.119Z ==3454== by 0xBEEE4DF: google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&) const (descriptor.cc:4551) 2024-11-19T01:23:14.134Z ==3454== by 0xBEEE76F: google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2563) 2024-11-19T01:23:14.149Z ==3454== by 0xBEEEA7F: google::protobuf::DescriptorPool::FindFileByName(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2143) 2024-11-19T01:23:14.159Z ==3454== by 0xBF714B3: google::protobuf::(anonymous namespace)::AssignDescriptorsImpl(google::protobuf::internal::DescriptorTable const*, bool) (generated_message_reflection.cc:3626) 2024-11-19T01:23:14.178Z ==3454== by 0xBF7178B: operator() (generated_message_reflection.cc:3707) 2024-11-19T01:23:14.183Z ==3454== by 0xBF7178B: __invoke_impl<void, google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:60) 2024-11-19T01:23:14.203Z ==3454== by 0xBF7178B: __invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:95) 2024-11-19T01:23:14.223Z ==3454== by 0xBF7178B: invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (functional:88) 2024-11-19T01:23:14.248Z ==3454== by 0xBF7178B: void absl::lts_20240116::base_internal::CallOnceImpl<google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}>(std::atomic<unsigned int>*, absl::lts_20240116::base_internal::SchedulingMode, google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}&&) [clone .constprop.0] (call_once.h:182) 2024-11-19T01:23:14.297Z ==3454== by 0xBF718B3: call_once<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (call_once.h:216) 2024-11-19T01:23:14.317Z ==3454== by 0xBF718B3: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&) (generated_message_reflection.cc:3704) 2024-11-19T01:23:14.337Z ==3454== by 0xBEE239F: GetDescriptor (descriptor.pb.h:9939) 2024-11-19T01:23:14.342Z ==3454== by 0xBEE239F: descriptor (descriptor.pb.h:9936) 2024-11-19T01:23:14.347Z ==3454== by 0xBEE239F: google::protobuf::DescriptorPool::generated_pool() (descriptor.cc:2089) 2024-11-19T01:23:14.356Z ==3454== by 0xBF7002F: MaybeInitializeLazyDescriptors (generated_message_reflection.cc:3655) 2024-11-19T01:23:14.366Z ==3454== by 0xBF7002F: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*) (generated_message_reflection.cc:3714) 2024-11-19T01:23:14.381Z ==3454== Your program just tried to execute an instruction that Valgrind 2024-11-19T01:23:14.387Z ==3454== did not recognise. There are two possible reasons for this. 2024-11-19T01:23:14.391Z ==3454== 1. Your program has a bug and erroneously jumped to a non-code 2024-11-19T01:23:14.396Z ==3454== location. If you are running Memcheck and you just saw a 2024-11-19T01:23:14.406Z ==3454== warning about a bad jump, it's probably your program's fault. 2024-11-19T01:23:14.411Z ==3454== 2. The instruction is legitimate but Valgrind doesn't handle it, 2024-11-19T01:23:14.416Z ==3454== i.e. it's Valgrind's fault. If you think this is the case or 2024-11-19T01:23:14.426Z ==3454== you are not sure, please let us know and we'll try to fix it. 2024-11-19T01:23:14.431Z ==3454== Either way, Valgrind will now raise a SIGILL signal which will 2024-11-19T01:23:14.436Z ==3454== probably kill your program. 2024-11-19T01:23:14.441Z ==3454== 2024-11-19T01:23:14.441Z ==3454== Process terminating with default action of signal 4 (SIGILL): dumping core 2024-11-19T01:23:14.446Z ==3454== Illegal opcode at address 0xBEE5CC4 2024-11-19T01:23:14.451Z ==3454== at 0xBEE5CC4: store (atomic_base.h:725) 2024-11-19T01:23:14.455Z ==3454== by 0xBEE5CC4: operator= (atomic_base.h:632) 2024-11-19T01:23:14.460Z ==3454== by 0xBEE5CC4: operator= (atomic:392) 2024-11-19T01:23:14.465Z ==3454== by 0xBEE5CC4: google::protobuf::DescriptorBuilder::BuildFieldOrExtension(google::protobuf::FieldDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::FieldDescriptor*, bool, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6493) 2024-11-19T01:23:14.490Z ==3454== by 0xBEE8A03: BuildField (descriptor.cc:4224) 2024-11-19T01:23:14.495Z ==3454== by 0xBEE8A03: google::protobuf::DescriptorBuilder::BuildMessage(google::protobuf::DescriptorProto const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor*, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6040) 2024-11-19T01:23:14.515Z ==3454== by 0xBEEC1F7: google::protobuf::DescriptorBuilder::BuildFileImpl(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&) (descriptor.cc:5874) 2024-11-19T01:23:14.535Z ==3454== by 0xBEEDCD3: google::protobuf::DescriptorBuilder::BuildFile(google::protobuf::FileDescriptorProto const&) (descriptor.cc:5632) 2024-11-19T01:23:14.545Z ==3454== by 0xBEEE4DF: google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&) const (descriptor.cc:4551) 2024-11-19T01:23:14.559Z ==3454== by 0xBEEE76F: google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2563) 2024-11-19T01:23:14.574Z ==3454== by 0xBEEEA7F: google::protobuf::DescriptorPool::FindFileByName(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2143) 2024-11-19T01:23:14.589Z ==3454== by 0xBF714B3: google::protobuf::(anonymous namespace)::AssignDescriptorsImpl(google::protobuf::internal::DescriptorTable const*, bool) (generated_message_reflection.cc:3626) 2024-11-19T01:23:14.604Z ==3454== by 0xBF7178B: operator() (generated_message_reflection.cc:3707) 2024-11-19T01:23:14.609Z ==3454== by 0xBF7178B: __invoke_impl<void, google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:60) 2024-11-19T01:23:14.634Z ==3454== by 0xBF7178B: __invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:95) 2024-11-19T01:23:14.653Z ==3454== by 0xBF7178B: invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (functional:88) 2024-11-19T01:23:14.673Z ==3454== by 0xBF7178B: void absl::lts_20240116::base_internal::CallOnceImpl<google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}>(std::atomic<unsigned int>*, absl::lts_20240116::base_internal::SchedulingMode, google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}&&) [clone .constprop.0] (call_once.h:182) 2024-11-19T01:23:14.723Z ==3454== by 0xBF718B3: call_once<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (call_once.h:216) 2024-11-19T01:23:14.743Z ==3454== by 0xBF718B3: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&) (generated_message_reflection.cc:3704) 2024-11-19T01:23:14.763Z ==3454== by 0xBEE239F: GetDescriptor (descriptor.pb.h:9939) 2024-11-19T01:23:14.767Z ==3454== by 0xBEE239F: descriptor (descriptor.pb.h:9936) 2024-11-19T01:23:14.772Z ==3454== by 0xBEE239F: google::protobuf::DescriptorPool::generated_pool() (descriptor.cc:2089) 2024-11-19T01:23:14.782Z ==3454== by 0xBF7002F: MaybeInitializeLazyDescriptors (generated_message_reflection.cc:3655) 2024-11-19T01:23:14.792Z ==3454== by 0xBF7002F: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*) (generated_message_reflection.cc:3714) 2024-11-19T01:23:14.807Z ==3454== 2024-11-19T01:23:14.807Z ==3454== HEAP SUMMARY: 2024-11-19T01:23:14.807Z ==3454== in use at exit: 1,301,901 bytes in 15,081 blocks 2024-11-19T01:23:14.812Z ==3454== total heap usage: 117,907 allocs, 102,826 frees, 6,995,214 bytes allocated 2024-11-19T01:23:14.822Z ==3454== 2024-11-19T01:23:14.822Z ==3454== LEAK SUMMARY: 2024-11-19T01:23:14.827Z ==3454== definitely lost: 0 bytes in 0 blocks 2024-11-19T01:23:14.832Z 2024-11-19T01:23:14.832Z ==3454== indirectly lost: 0 bytes in 0 blocks 2024-11-19T01:23:14.832Z 2024-11-19T01:23:14.832Z ==3454== possibly lost: 59,054 bytes in 1,009 blocks 2024-11-19T01:23:14.837Z ==3454== still reachable: 1,242,847 bytes in 14,072 blocks 2024-11-19T01:23:14.846Z ==3454== of which reachable via heuristic: 2024-11-19T01:23:14.852Z ==3454== newarray : 960 bytes in 4 blocks 2024-11-19T01:23:14.857Z ==3454== suppressed: 0 bytes in 0 blocks 2024-11-19T01:23:14.861Z ==3454== Reachable blocks (those to which a pointer was found) are not shown. 2024-11-19T01:23:14.866Z ==3454== To see them, rerun with: --leak-check=full --show-leak-kinds=all 2024-11-19T01:23:14.876Z ==3454== 2024-11-19T01:23:14.876Z ==3454== For lists of detected and suppressed errors, rerun with: -s 2024-11-19T01:23:14.886Z ==3454== ERROR SUMMARY: 48 errors from 48 contexts (suppressed: 0 from 0) EXPECTED RESULT There should be no crash. SOFTWARE/OS VERSIONS Linux: uname -a Linux 32EC3-81-1 5.10.216-nokia-wr21 #V66.64.02 RT SMP PREEMPT Thu Oct 31 09:45:47 EDT 2024 aarch64 aarch64 aarch64 GNU/Linux This is an embedded system, telecom infrastructure using Wind River Linux 21 on aarch64 architecture. ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.