Skip to content

Commit 90e6808

Browse files
committed
Skip two WatchpointAlgorithm tests for 32-bit lldb's
After iterating with the arm-ubuntu CI bot, I found the crash (a std::bad_alloc exception being thrown) was caused by these two entries when built on a 32-bit machine. I probably have an assumption about size_t being 64-bits in WatchpointAlgorithms and we have a problem when it's actually 32-bits and we're dealing with a real 64-bit address. All of the cases where the address can be represented in the low 32-bits of the addr_t work correctly, so for now I'm skipping these two unit tests when building lldb on a 32-bit host until I can review that method and possibly switch to explicit uin64_t's. .
1 parent eaa3d5e commit 90e6808

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/unittests/Breakpoint/WatchpointAlgorithmsTests.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
4343

4444
// clang-format off
4545
std::vector<testcase> doubleword_max = {
46+
#if defined(__LP64__)
47+
// These two tests don't work if lldb is built on
48+
// a 32-bit system (likely with a 32-bit size_t).
49+
// A 32-bit lldb debugging a 64-bit process isn't
50+
// critical right now.
4651
{
4752
{0x7fffffffe83b, 1},
4853
{{0x7fffffffe83b, 1}}
@@ -51,6 +56,7 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
5156
{0x7fffffffe838, 2},
5257
{{0x7fffffffe838, 2}}
5358
},
59+
#endif
5460
{
5561
{0x1012, 8},
5662
{{0x1010, 8}, {0x1018, 8}}

0 commit comments

Comments
 (0)