Skip to content

Commit 0d20f3f

Browse files
committed
[lldb][test] Fix address type in ReadMemoryRanges test
Tests added by #163651. Use lldb::addr_t (which is always 64-bit) for all addresses so that we don't calculate an invalid address on 32-bit and segfault. As happened on Linaro's Arm 32-bit buildbot.
1 parent 1fbfac3 commit 0d20f3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/unittests/Target/MemoryTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class DummyReaderProcess : public Process {
245245
if (read_more_than_requested)
246246
size *= 2;
247247
uint8_t *buffer = static_cast<uint8_t *>(buf);
248-
for (size_t addr = vm_addr; addr < vm_addr + size; addr++)
248+
for (lldb::addr_t addr = vm_addr; addr < vm_addr + size; addr++)
249249
buffer[addr - vm_addr] = static_cast<uint8_t>(addr); // LSB of addr.
250250
return size;
251251
}

0 commit comments

Comments
 (0)