Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Make ValueObjectDynamicValue::UpdateValue() point to a host b… #125143

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

augusto2112
Copy link
Contributor

…uffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type found by GetDynamicTypeAndAddress() would return an address in the inferior. This commit makes it so it can deal with being passed a host address instead.

This is needed downstream by the Swift fork.

rdar://143357274

@llvmbot
Copy link
Member

llvmbot commented Jan 31, 2025

@llvm/pr-subscribers-lldb

Author: Augusto Noronha (augusto2112)

Changes

…uffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type found by GetDynamicTypeAndAddress() would return an address in the inferior. This commit makes it so it can deal with being passed a host address instead.

This is needed downstream by the Swift fork.

rdar://143357274


Full diff: https://github.com/llvm/llvm-project/pull/125143.diff

2 Files Affected:

  • (modified) lldb/include/lldb/Target/LanguageRuntime.h (+3-1)
  • (modified) lldb/source/ValueObject/ValueObjectDynamicValue.cpp (+18-6)
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 4a0214b04e235e..08db8a17a67e69 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -105,7 +105,9 @@ class LanguageRuntime : public Runtime, public PluginInterface {
         "language doesn't support getting vtable information");
   }
 
-  // this call should return true if it could set the name and/or the type
+  // This call should return true if it could set the name and/or the type.
+  // address can be either a legitimate address on the inferior, or an address
+  // in lldb, if value_type == HostAddress.
   virtual bool GetDynamicTypeAndAddress(ValueObject &in_value,
                                         lldb::DynamicValueType use_dynamic,
                                         TypeAndOrName &class_type_or_name,
diff --git a/lldb/source/ValueObject/ValueObjectDynamicValue.cpp b/lldb/source/ValueObject/ValueObjectDynamicValue.cpp
index 588c644bbfd07b..10a5a9d0b76919 100644
--- a/lldb/source/ValueObject/ValueObjectDynamicValue.cpp
+++ b/lldb/source/ValueObject/ValueObjectDynamicValue.cpp
@@ -239,11 +239,19 @@ bool ValueObjectDynamicValue::UpdateValue() {
     if (m_address.IsValid())
       SetValueDidChange(true);
 
-    // We've moved, so we should be fine...
-    m_address = dynamic_address;
-    lldb::TargetSP target_sp(GetTargetSP());
-    lldb::addr_t load_address = m_address.GetLoadAddress(target_sp.get());
-    m_value.GetScalar() = load_address;
+    // If we found a host address, point to the buffer in host memory.
+    // Later on this function will copy the buffer over.
+    if (value_type == Value::ValueType::HostAddress) {
+      m_value.GetScalar() = dynamic_address.GetOffset();
+      m_address = LLDB_INVALID_ADDRESS;
+    } else {
+      // Otherwise we have a legitimate address on the target. Point to the load
+      // address.
+      m_address = dynamic_address;
+      lldb::TargetSP target_sp(GetTargetSP());
+      lldb::addr_t load_address = m_address.GetLoadAddress(target_sp.get());
+      m_value.GetScalar() = load_address;
+    }
   }
 
   if (runtime)
@@ -258,7 +266,11 @@ bool ValueObjectDynamicValue::UpdateValue() {
     LLDB_LOGF(log, "[%s %p] has a new dynamic type %s", GetName().GetCString(),
               static_cast<void *>(this), GetTypeName().GetCString());
 
-  if (m_address.IsValid() && m_dynamic_type_info) {
+  // m_address could be invalid but we could still have a local buffer
+  // containing the dynamic value.
+  if ((m_address.IsValid() ||
+       m_value.GetValueType() == Value::ValueType::HostAddress) &&
+      m_dynamic_type_info) {
     // The variable value is in the Scalar value inside the m_value. We can
     // point our m_data right to it.
     m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());

@jimingham
Copy link
Collaborator

I worry a bit about the fact that in the host case, GetValueAsData is going to end up calling:

  memcpy(dst, reinterpret_cast<uint8_t *>(address), byte_size);

where address is the host data buffer and byte_size is the size of the new dynamic type. But in the case where the Value has data in the m_data_buffer, address points to a buffer. The code makes sure that the destination buffer (pointed to by dst) is big enough to fit byte_size, but I don't see the guarantee that the original contents are not smaller than the new dynamic type byte size.
If we get that wrong, then we'll crash here or worse sample lldb internal memory and present that to the user as a value.
How do you know that can't happen?

@augusto2112
Copy link
Contributor Author

I worry a bit about the fact that in the host case, GetValueAsData is going to end up calling:

  memcpy(dst, reinterpret_cast<uint8_t *>(address), byte_size);

where address is the host data buffer and byte_size is the size of the new dynamic type. But in the case where the Value has data in the m_data_buffer, address points to a buffer. The code makes sure that the destination buffer (pointed to by dst) is big enough to fit byte_size, but I don't see the guarantee that the original contents are not smaller than the new dynamic type byte size. If we get that wrong, then we'll crash here or worse sample lldb internal memory and present that to the user as a value. How do you know that can't happen?

I implemented that check inside GetDynamicTypeAndAddress. If the buffer is not big enough that function will set address_type as invalid. I think that's the logical place to implement this check, since finding the dynamic type and address is its whole responsibility.

@jimingham
Copy link
Collaborator

Maybe I'm missing something. In the host case, m_address is set to invalid, but m_value has the address in it and is a host address, so then we get to:

// m_address could be invalid but we could still have a local buffer
// containing the dynamic value.
if ((m_address.IsValid() ||
m_value.GetValueType() == Value::ValueType::HostAddress) &&
m_dynamic_type_info) {
// The variable value is in the Scalar value inside the m_value. We can
// point our m_data right to it.
m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());

So that's going to try to call GetValueAsData on a value you've added the dynamic type info to, and that type could be bigger than the static value, causing us to read too much from the data buffer.

@augusto2112
Copy link
Contributor Author

Maybe I'm missing something. In the host case, m_address is set to invalid, but m_value has the address in it and is a host address, so then we get to:

// m_address could be invalid but we could still have a local buffer // containing the dynamic value. if ((m_address.IsValid() || m_value.GetValueType() == Value::ValueType::HostAddress) && m_dynamic_type_info) { // The variable value is in the Scalar value inside the m_value. We can // point our m_data right to it. m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());

So that's going to try to call GetValueAsData on a value you've added the dynamic type info to, and that type could be bigger than the static value, causing us to read too much from the data buffer.

What I mean is GetDynamicTypeAndAddress will only return value_type=host_address and point address to that buffer if it knows that the dynamic type fits in that buffer. I'm implementing that downstream by comparing the static type size against the dynamic type size (since the buffer needs to fit the static size).

If you're still not comfortable to that I'm open to changing the API of GetDynamicTypeAndAddress to return a buffer or an address + size when it finds a host address.

@jimingham
Copy link
Collaborator

I think it's worth making it as hard as possible to get the length you're supposed to read from that buffer right.

@jimingham
Copy link
Collaborator

This is a very common crash point. I suspect that in most of the cases it's because we flub whether something is a load or a host address, but I still don't want to add other mistakes we could make here.

@augusto2112
Copy link
Contributor Author

Ok, fair point. I'll come up with a more robust solution.

@augusto2112
Copy link
Contributor Author

Jim I updated the PR.

@jimingham
Copy link
Collaborator

Is there's no way to test this with the languages supported by the upstream lldb?

@augusto2112
Copy link
Contributor Author

Unfortunately I wasn't able to construct a test case that would trigger this with upstream lldb.

@jimingham
Copy link
Collaborator

What are the ownership rules for that reference to bytes that you are passing out? Who's keeping it alive and for how long?

@augusto2112
Copy link
Contributor Author

What are the ownership rules for that reference to bytes that you are passing out? Who's keeping it alive and for how long?

Since ValueObjectDynamicValue::UpdateValue immediately copies the buffer over I don't think that's a big concern...

I could change ArrayRef to an actual buffer that owns the data, but I think that would be a bit wasteful since UpdateValue always copies it anyway.

Or are you asking me to clarify in the documentation that callers have to copy out the data if they want to own it?

@jimingham
Copy link
Collaborator

jimingham commented Feb 3, 2025 via email

Copy link

github-actions bot commented Feb 4, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@augusto2112 augusto2112 force-pushed the host-buffer-dyn-valobj branch from 384ba61 to 50d39c0 Compare February 4, 2025 16:36
@jimingham
Copy link
Collaborator

This is a little weird - why would the value of a ValueObject when interpreted as its Dynamic Value ever be in host memory? That seems odd, made doubly so because it's unused in the current sources. So I really worry about this getting broken.

Would it be possible to cons up a unittest that makes this artificially?

@augusto2112
Copy link
Contributor Author

To make sure I understand, you want me to write a unittest where I have a value object, and make sure it's dynamic value object child uses the local buffer to store the contents? What should I test? That it prints correctly?

@jimingham
Copy link
Collaborator

jimingham commented Feb 5, 2025 via email

@augusto2112 augusto2112 force-pushed the host-buffer-dyn-valobj branch from 04e392f to 441192a Compare February 6, 2025 01:53
@augusto2112
Copy link
Contributor Author

Jim I was able to write a unit test.

@@ -0,0 +1,237 @@
//===-- DumpValueObjectOptionsTests.cpp -----------------------------------===//
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong filename

Copy link
Collaborator

@jimingham jimingham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making that work! LGTM

@augusto2112 augusto2112 force-pushed the host-buffer-dyn-valobj branch 2 times, most recently from ceb193b to e8124c1 Compare February 6, 2025 20:18
…ffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type
found by GetDynamicTypeAndAddress() would return an address in the
inferior.  This commit makes it so it can deal with being passed a
host address instead.

This is needed downstream by the Swift fork.

rdar://143357274
@augusto2112 augusto2112 force-pushed the host-buffer-dyn-valobj branch from e8124c1 to 937fdea Compare February 7, 2025 03:03
@augusto2112 augusto2112 merged commit 0cbc498 into llvm:main Feb 7, 2025
4 of 6 checks passed
augusto2112 added a commit to augusto2112/llvm-project that referenced this pull request Feb 7, 2025
…llvm#125143)

…uffer

ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type
found by GetDynamicTypeAndAddress() would return an address in the
inferior. This commit makes it so it can deal with being passed a host
address instead.

This is needed downstream by the Swift fork.

rdar://143357274
(cherry picked from commit 0cbc498)
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 7, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building lldb at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/11097

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
23.053 [7/11/245] Building CXX object tools/lldb/unittests/Symbol/CMakeFiles/SymbolTests.dir/TestTypeSystemClang.cpp.o
23.305 [7/10/246] Building CXX object tools/lldb/unittests/Platform/Android/CMakeFiles/AdbClientTests.dir/PlatformAndroidTest.cpp.o
23.977 [6/10/247] Linking CXX executable tools/lldb/unittests/Target/TargetTests
24.187 [6/9/248] Linking CXX executable bin/lldb-test
24.378 [6/8/249] Linking CXX executable tools/lldb/unittests/Platform/Android/AdbClientTests
24.666 [6/7/250] Building CXX object tools/lldb/unittests/Expression/CMakeFiles/ExpressionTests.dir/DWARFExpressionTest.cpp.o
26.214 [6/6/251] Building CXX object tools/lldb/unittests/Symbol/CMakeFiles/SymbolTests.dir/TestClangASTImporter.cpp.o
26.575 [6/5/252] Building CXX object tools/lldb/unittests/Symbol/CMakeFiles/SymbolTests.dir/TestLineEntry.cpp.o
28.325 [5/5/253] Linking CXX executable tools/lldb/unittests/Symbol/SymbolTests
28.330 [5/4/254] Building CXX object tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.o
FAILED: tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLLVM_BUILD_STATIC -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/unittests/ValueObject -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/unittests/ValueObject -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/llvm/../clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb/../clang/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/source -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/unittests -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/third-party/unittest/googlemock/include -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -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 -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  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.o -MF tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.o.d -o tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.o -c /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp
../llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp:71:21: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
   71 |                     in_value.GetLocalBufferSize()};
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp:71:21: note: insert an explicit cast to silence this issue
   71 |                     in_value.GetLocalBufferSize()};
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     static_cast<size_t>(         )
1 error generated.
29.149 [5/3/255] Building CXX object tools/lldb/unittests/SymbolFile/DWARF/CMakeFiles/SymbolFileDWARFTests.dir/DWARFASTParserClangTests.cpp.o
30.595 [5/2/256] Building CXX object tools/lldb/unittests/Thread/CMakeFiles/ThreadTests.dir/ThreadTest.cpp.o
32.565 [5/1/257] Building CXX object tools/lldb/unittests/Expression/CMakeFiles/ExpressionTests.dir/ClangExpressionDeclMapTest.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 7, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-win running on as-builder-10 while building lldb at step 16 "test-check-lldb-unit".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/1717

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-unit) failure: Test just built components: check-lldb-unit completed (failure)
...
7.024 [32/37/217]Building CXX object tools\lldb\unittests\Language\Highlighting\CMakeFiles\HighlighterTests.dir\HighlighterTest.cpp.obj
7.198 [32/36/218]Building CXX object tools\lldb\unittests\DataFormatter\CMakeFiles\LLDBFormatterTests.dir\FormattersContainerTest.cpp.obj
7.628 [32/35/219]Building CXX object tools\lldb\unittests\DataFormatter\CMakeFiles\LLDBFormatterTests.dir\FormatManagerTests.cpp.obj
8.403 [32/34/220]Building CXX object tools\lldb\unittests\Language\ObjC\CMakeFiles\LanguageObjCTests.dir\ObjCLanguageTest.cpp.obj
8.630 [32/33/221]Linking CXX executable tools\lldb\unittests\Callback\LLDBCallbackTests.exe
9.394 [31/33/222]Linking CXX executable tools\lldb\unittests\Instruction\EmulatorTests.exe
9.643 [30/33/223]Building CXX object tools\lldb\unittests\Language\CPlusPlus\CMakeFiles\LanguageCPlusPlusTests.dir\CPlusPlusLanguageTest.cpp.obj
10.025 [30/32/224]Linking CXX executable tools\lldb\unittests\ObjectFile\ELF\ObjectFileELFTests.exe
10.065 [29/32/225]Linking CXX executable tools\lldb\unittests\Interpreter\InterpreterTests.exe
10.364 [28/32/226]Building CXX object tools\lldb\unittests\ValueObject\CMakeFiles\LLDBValueObjectTests.dir\DynamicValueObjectLocalBuffer.cpp.obj
FAILED: tools/lldb/unittests/ValueObject/CMakeFiles/LLDBValueObjectTests.dir/DynamicValueObjectLocalBuffer.cpp.obj 
ccache C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\unittests\ValueObject -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\llvm\include -IC:\Python312\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\llvm\..\clang\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\build\tools\lldb\..\clang\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\source -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\third-party\unittest\googletest\include -IC:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\third-party\unittest\googlemock\include -D__OPTIMIZE__ /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2  -MD   -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 -wd4589  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\lldb\unittests\ValueObject\CMakeFiles\LLDBValueObjectTests.dir\DynamicValueObjectLocalBuffer.cpp.obj /Fdtools\lldb\unittests\ValueObject\CMakeFiles\LLDBValueObjectTests.dir\ /FS -c C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp(221): error C2065: 'u_int8_t': undeclared identifier
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp(221): error C2146: syntax error: missing ';' before identifier 'value'
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp(221): error C2065: 'value': undeclared identifier
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp(223): error C2065: 'value': undeclared identifier
C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\unittests\ValueObject\DynamicValueObjectLocalBuffer.cpp(223): error C2065: 'value': undeclared identifier
10.451 [28/31/227]Linking CXX executable tools\lldb\unittests\Process\gdb-remote\ProcessGdbRemoteTests.exe
10.939 [28/30/228]Linking CXX executable tools\lldb\unittests\ObjectFile\PECOFF\ObjectFilePECOFFTests.exe
10.948 [28/29/229]Linking CXX executable tools\lldb\unittests\Core\LLDBCoreTests.exe
10.967 [28/28/230]Building CXX object tools\lldb\unittests\Platform\CMakeFiles\LLDBPlatformTests.dir\PlatformSiginfoTest.cpp.obj
11.210 [28/27/231]Linking CXX executable tools\lldb\unittests\Process\ProcessEventDataTests.exe
12.081 [28/26/232]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\DWARFIndexCachingTest.cpp.obj
12.131 [28/25/233]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\DWARFUnitTest.cpp.obj
12.299 [28/24/234]Building CXX object tools\lldb\unittests\Target\CMakeFiles\TargetTests.dir\StackFrameRecognizerTest.cpp.obj
12.692 [28/23/235]Building CXX object tools\lldb\unittests\Target\CMakeFiles\TargetTests.dir\ExecutionContextTest.cpp.obj
12.902 [28/22/236]Building CXX object tools\lldb\unittests\Thread\CMakeFiles\ThreadTests.dir\ThreadTest.cpp.obj
13.480 [28/21/237]Building CXX object tools\lldb\unittests\TestingSupport\Symbol\CMakeFiles\lldbSymbolHelpers.dir\YAMLModuleTester.cpp.obj
13.554 [28/20/238]Building CXX object tools\lldb\unittests\Target\CMakeFiles\TargetTests.dir\LocateModuleCallbackTest.cpp.obj
13.632 [28/19/239]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\XcodeSDKModuleTests.cpp.obj
13.763 [28/18/240]Building CXX object tools\lldb\unittests\ValueObject\CMakeFiles\LLDBValueObjectTests.dir\DumpValueObjectOptionsTests.cpp.obj
13.804 [28/17/241]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\DWARFDebugNamesIndexTest.cpp.obj
13.890 [28/16/242]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\SymbolFileDWARFTests.cpp.obj
14.210 [28/15/243]Building CXX object tools\lldb\tools\lldb-test\CMakeFiles\lldb-test.dir\lldb-test.cpp.obj
14.678 [28/14/244]Building CXX object tools\lldb\unittests\Expression\CMakeFiles\ExpressionTests.dir\ClangExpressionDeclMapTest.cpp.obj
14.685 [28/13/245]Building CXX object tools\lldb\unittests\SymbolFile\PDB\CMakeFiles\SymbolFilePDBTests.dir\SymbolFilePDBTests.cpp.obj
14.736 [28/12/246]Building CXX object tools\lldb\unittests\Symbol\CMakeFiles\SymbolTests.dir\SymtabTest.cpp.obj
16.298 [28/11/247]Building CXX object tools\lldb\unittests\Platform\Android\CMakeFiles\AdbClientTests.dir\PlatformAndroidTest.cpp.obj
16.321 [28/10/248]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\DWARFDIETest.cpp.obj
16.401 [28/9/249]Building CXX object tools\lldb\unittests\Expression\CMakeFiles\ExpressionTests.dir\DWARFExpressionTest.cpp.obj
16.439 [28/8/250]Building CXX object tools\lldb\unittests\Symbol\CMakeFiles\SymbolTests.dir\TestTypeSystemClang.cpp.obj
16.773 [28/7/251]Linking CXX executable tools\lldb\unittests\Language\Highlighting\HighlighterTests.exe
16.929 [28/6/252]Linking CXX executable tools\lldb\unittests\Language\CLanguages\LanguageCLanguagesTests.exe
17.452 [28/5/253]Building CXX object tools\lldb\unittests\Symbol\CMakeFiles\SymbolTests.dir\TestLineEntry.cpp.obj
17.904 [28/4/254]Linking CXX executable tools\lldb\unittests\DataFormatter\LLDBFormatterTests.exe
18.100 [28/3/255]Linking CXX executable tools\lldb\unittests\Language\CPlusPlus\LanguageCPlusPlusTests.exe
18.605 [28/2/256]Building CXX object tools\lldb\unittests\Symbol\CMakeFiles\SymbolTests.dir\TestClangASTImporter.cpp.obj
20.371 [28/1/257]Building CXX object tools\lldb\unittests\SymbolFile\DWARF\CMakeFiles\SymbolFileDWARFTests.dir\DWARFASTParserClangTests.cpp.obj
ninja: build stopped: subcommand failed.

@slydiman
Copy link
Contributor

slydiman commented Feb 7, 2025

Please fix ASAP
https://lab.llvm.org/buildbot/#/builders/197/builds/1717

llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp(221): error C2065: 'u_int8_t': undeclared identifier

https://lab.llvm.org/buildbot/#/builders/18/builds/11097

llvm-project/lldb/unittests/ValueObject/DynamicValueObjectLocalBuffer.cpp:71:21: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
   71 |                     in_value.GetLocalBufferSize()};

@DavidSpickett
Copy link
Collaborator

I will push something shortly for this.

@DavidSpickett
Copy link
Collaborator

9d83790
52db30e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants