[Lldb-commits] [lldb] [lldb] Clear error in Target::ReadMemory before calling Process::ReadMemory (PR #217148)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 18 15:53:29 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>tools/lldb/unittests/Target/CMakeFiles/TargetTests.dir/MemoryTest.cpp.o</summary>
```
FAILED: tools/lldb/unittests/Target/CMakeFiles/TargetTests.dir/MemoryTest.cpp.o
sccache /opt/llvm/bin/clang++ -DHAVE_ROUND -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/unittests/Target -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb/../clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/source -I/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googletest/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googlemock/include -isystem /usr/include/libxml2 -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG -std=c++17 -UNDEBUG -Wno-suggest-override -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/lldb/unittests/Target/CMakeFiles/TargetTests.dir/MemoryTest.cpp.o -MF tools/lldb/unittests/Target/CMakeFiles/TargetTests.dir/MemoryTest.cpp.o.d -o tools/lldb/unittests/Target/CMakeFiles/TargetTests.dir/MemoryTest.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target/MemoryTest.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target/MemoryTest.cpp:1048:69: error: non-virtual member function marked 'override' hides virtual member function
1048 | size_t ReadMemory(lldb::addr_t, void *buf, size_t size, Status &) override {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Target/Process.h:1633:18: note: hidden overloaded virtual function 'lldb_private::Process::ReadMemory' declared here: type mismatch at 1st parameter ('const ProcessAddress &' vs 'lldb::addr_t' (aka 'unsigned long'))
1633 | virtual size_t ReadMemory(const ProcessAddress &process_addr, void *buf,
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target/MemoryTest.cpp:1064:63: error: non-virtual member function marked 'override' hides virtual member function
1064 | size_t DoReadMemory(lldb::addr_t, void *, size_t, Status &) override {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Target/Process.h:3055:18: note: hidden overloaded virtual function 'lldb_private::Process::DoReadMemory' declared here: type mismatch at 1st parameter ('const ProcessAddress &' vs 'lldb::addr_t' (aka 'unsigned long'))
3055 | virtual size_t DoReadMemory(const ProcessAddress &process_addr, void *buf,
| ^
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target/MemoryTest.cpp:9:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Target/Memory.h:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Utility/RangeMap.h:12:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/algorithm:61:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algo.h:69:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_tempbuf.h:61:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_construct.h:119:25: error: allocating an object of abstract class type 'StatusPreservingProcess'
119 | ::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:661:9: note: in instantiation of function template specialization 'std::_Construct<StatusPreservingProcess, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
661 | { std::_Construct(__p, std::forward<_Args>(__args)...); }
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:604:30: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::construct<StatusPreservingProcess, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
604 | allocator_traits<_Alloc>::construct(__a, _M_ptr(),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:972:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<StatusPreservingProcess, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
972 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1712:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<StatusPreservingProcess, std::allocator<void>, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
1712 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:464:4: note: in instantiation of function template specialization 'std::__shared_ptr<StatusPreservingProcess>::__shared_ptr<std::allocator<void>, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
464 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...)
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:1009:14: note: in instantiation of function template specialization 'std::shared_ptr<StatusPreservingProcess>::shared_ptr<std::allocator<void>, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
1009 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/unittests/Target/MemoryTest.cpp:1088:12: note: in instantiation of function template specialization 'std::make_shared<StatusPreservingProcess, std::shared_ptr<lldb_private::Target> &, std::shared_ptr<lldb_private::Listener> &>' requested here
1088 | std::make_shared<StatusPreservingProcess>(target_sp, listener_sp);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/include/lldb/Target/Process.h:3055:18: note: unimplemented pure virtual method 'DoReadMemory' in 'StatusPreservingProcess'
3055 | virtual size_t DoReadMemory(const ProcessAddress &process_addr, void *buf,
| ^
3 errors generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/217148
More information about the lldb-commits
mailing list