CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
52 lines
1.9 KiB
Python
52 lines
1.9 KiB
Python
import lldb
|
|
import json
|
|
import os
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
# 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.
|
|
def create_symbols_file(self):
|
|
template_path = os.path.join(self.getSourceDir(), "extra_symbols.json")
|
|
with open(template_path, "r") as f:
|
|
symbols_data = json.load(f)
|
|
|
|
target = self.dbg.GetSelectedTarget()
|
|
symbols_data["triple"] = target.GetTriple()
|
|
|
|
module = target.GetModuleAtIndex(0)
|
|
symbols_data["uuid"] = module.GetUUIDString()
|
|
|
|
json_filename = self.getBuildArtifact("extra_symbols.json")
|
|
with open(json_filename, "w") as file:
|
|
json.dump(symbols_data, file, indent=4)
|
|
|
|
return json_filename
|
|
|
|
def test(self):
|
|
self.build()
|
|
src = lldb.SBFileSpec("main.c")
|
|
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
|
|
self, "break here", src
|
|
)
|
|
|
|
symbols_file = self.create_symbols_file()
|
|
self.runCmd(f"target module add {symbols_file}")
|
|
|
|
# The high order bits should be stripped.
|
|
self.expect_expr("get_high_bits(&myglobal_json)", result_value="0")
|
|
|
|
# Mark all bits as used for addresses and ensure bits are no longer stripped.
|
|
self.runCmd("settings set target.process.virtual-addressable-bits 64")
|
|
self.expect_expr(
|
|
"get_high_bits(&myglobal_json)", result_value=str(0x1200000000000000)
|
|
)
|