Skip to content

Conversation

DavidSpickett
Copy link
Collaborator

First added in #153585 for Darwin only. All Linux AArch64 systems also have Top Byte Ignore enabled in userspace so the test "just works" there.

FreeBSD has very recently gained Top Byte Ignore support: freebsd/freebsd-src@4c6c27d

However it's so recent, I don't want to assume it'll be available on any random FreeBSD system out there.

There isn't really a good place to put this test, so I put it in the top level of API, next to the other non-address bit test that didn't have a good home either.

First added in llvm#153585 for Darwin only. All Linux AArch64 systems also
have Top Byte Ignore enabled in userspace so the test "just works" there.

FreeBSD has very recently gained Top Byte Ignore support:
freebsd/freebsd-src@4c6c27d

However it's so recent, I don't want to assume it'll be available on
any random FreeBSD system out there.

There isn't really a good place to put this test, so I put it in the
top level of API, next to the other non-address bit test that didn't
have a good home either.
@llvmbot
Copy link
Member

llvmbot commented Sep 8, 2025

@llvm/pr-subscribers-lldb

Author: David Spickett (DavidSpickett)

Changes

First added in #153585 for Darwin only. All Linux AArch64 systems also have Top Byte Ignore enabled in userspace so the test "just works" there.

FreeBSD has very recently gained Top Byte Ignore support: freebsd/freebsd-src@4c6c27d

However it's so recent, I don't want to assume it'll be available on any random FreeBSD system out there.

There isn't really a good place to put this test, so I put it in the top level of API, next to the other non-address bit test that didn't have a good home either.


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

4 Files Affected:

  • (renamed) lldb/test/API/pointer-nonaddressable-bits/Makefile ()
  • (renamed) lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py (+5-3)
  • (renamed) lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json ()
  • (renamed) lldb/test/API/pointer-nonaddressable-bits/main.c ()
diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/Makefile b/lldb/test/API/pointer-nonaddressable-bits/Makefile
similarity index 100%
rename from lldb/test/API/macosx/arm-pointer-metadata-stripping/Makefile
rename to lldb/test/API/pointer-nonaddressable-bits/Makefile
diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py b/lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py
similarity index 82%
rename from lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py
rename to lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py
index f61945b3eb4c9..21caf7195412a 100644
--- a/lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py
+++ b/lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py
@@ -5,9 +5,11 @@
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
-
-@skipUnlessDarwin
-@skipIf(archs=no_match(["arm64", "arm64e"]))
+# On AArch64 systems, unused top bits of pointers can be used for other things.
+@skipIf(archs=no_match(["aarch64", "arm64", "arm64e"]))
+# Only run this test on systems where Top Byte Ignore is known to be enabled
+# and widely available (FreeBSD has support but only since recently).
+@skipUnlessPlatform(["linux"] + lldbplatformutil.getDarwinOSTriples())
 class TestArmPointerMetadataStripping(TestBase):
     # Use extra_symbols.json as a template to add a new symbol whose address
     # contains non-zero high order bits set.
diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/extra_symbols.json b/lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json
similarity index 100%
rename from lldb/test/API/macosx/arm-pointer-metadata-stripping/extra_symbols.json
rename to lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json
diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/main.c b/lldb/test/API/pointer-nonaddressable-bits/main.c
similarity index 100%
rename from lldb/test/API/macosx/arm-pointer-metadata-stripping/main.c
rename to lldb/test/API/pointer-nonaddressable-bits/main.c

Copy link

github-actions bot commented Sep 8, 2025

✅ With the latest revision this PR passed the Python code formatter.

Copy link
Contributor

@felipepiovezan felipepiovezan left a comment

Choose a reason for hiding this comment

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

Argh, sorry for the delay, I missed the email for this PR.

LGTM! I thought the test would need some more work because of the section's names in the json file.

@DavidSpickett DavidSpickett merged commit b21dd44 into llvm:main Sep 19, 2025
9 checks passed
@DavidSpickett DavidSpickett deleted the lldb-nonaddresstest branch September 19, 2025 15:00
SeongjaeP pushed a commit to SeongjaeP/llvm-project that referenced this pull request Sep 23, 2025
llvm#157435)

First added in llvm#153585 for Darwin only. All Linux AArch64 systems also
have Top Byte Ignore enabled in userspace so the test "just works"
there.

FreeBSD has very recently gained Top Byte Ignore support:
freebsd/freebsd-src@4c6c27d

However it's so recent, I don't want to assume it'll be available on any
random FreeBSD system out there.

There isn't really a good place to put this test, so I put it in the top
level of API, next to the other non-address bit test that didn't have a
good home either.
YixingZhang007 pushed a commit to YixingZhang007/llvm-project that referenced this pull request Sep 27, 2025
llvm#157435)

First added in llvm#153585 for Darwin only. All Linux AArch64 systems also
have Top Byte Ignore enabled in userspace so the test "just works"
there.

FreeBSD has very recently gained Top Byte Ignore support:
freebsd/freebsd-src@4c6c27d

However it's so recent, I don't want to assume it'll be available on any
random FreeBSD system out there.

There isn't really a good place to put this test, so I put it in the top
level of API, next to the other non-address bit test that didn't have a
good home either.
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.

3 participants