Skip to content

Commit 90b6396

Browse files
committed
Run formatters [NFC]
1 parent 433c820 commit 90b6396

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

lldb/test/API/macosx/mte/TestDarwinMTE.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def test_tag_fault(self):
2626

2727
self.expect(
2828
"thread info",
29-
substrs=["stop reason = EXC_ARM_MTE_TAG_FAULT", "MTE tag mismatch detected"],
29+
substrs=[
30+
"stop reason = EXC_ARM_MTE_TAG_FAULT",
31+
"MTE tag mismatch detected",
32+
],
3033
)
3134

3235
@skipUnlessFeature(cpu_feature.AArch64.MTE)
@@ -44,7 +47,8 @@ def test_memory_read_with_tags(self):
4447
self.expect(
4548
"memory read ptr-16 ptr+48 --show-tags",
4649
substrs=[" Hello...........", " World..........."],
47-
patterns=[r"(.*\(tag: 0x[0-9a-f]\)\n){4}"])
50+
patterns=[r"(.*\(tag: 0x[0-9a-f]\)\n){4}"],
51+
)
4852

4953
def _parse_pointer_tag(self):
5054
return re.search(r"Logical tag: (0x[0-9a-f])", self.res.GetOutput()).group(1)
@@ -71,7 +75,7 @@ def test_memory_tag_read(self):
7175
self.expect(
7276
"memory tag read ptr-1 ptr+33",
7377
substrs=["Logical tag: 0x", "Allocation tags:", "(mismatch)"],
74-
patterns=[r"(\[.*\): 0x[0-9a-f].*\n){4}"]
78+
patterns=[r"(\[.*\): 0x[0-9a-f].*\n){4}"],
7579
)
7680
self.assertEqual(self.res.GetOutput().count("(mismatch)"), 2)
7781
ptr_tag = self._parse_pointer_tag()

lldb/test/API/macosx/mte/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ uint8_t *allocate(void) { return my_malloc(); }
1111
void my_free(void *ptr) { free(ptr); }
1212
void deallocate(void *ptr) { my_free(ptr); }
1313

14-
void touch_memory(uint8_t *ptr) { ptr[7] = 1; } // invalid access
14+
void touch_memory(uint8_t *ptr) { ptr[7] = 1; } // invalid access
1515
void modify(uint8_t *ptr) { touch_memory(ptr); }
1616

1717
int main() {
1818
uint8_t *ptr = allocate();
1919
printf("ptr: %p\n", ptr);
2020

2121
strcpy((char *)ptr, "Hello");
22-
strcpy((char *)ptr+16, "World");
22+
strcpy((char *)ptr + 16, "World");
2323

24-
deallocate(ptr); // before free
24+
deallocate(ptr); // before free
2525

26-
modify(ptr); // use-after-free
26+
modify(ptr); // use-after-free
2727

2828
return 0;
2929
}

lldb/tools/debugserver/source/RNBRemote.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4326,7 +4326,7 @@ rnb_err_t RNBRemote::HandlePacket_MemoryRegionInfo(const char *p) {
43264326
ostrm << "flags:";
43274327
for (size_t i = 0; i < region_info.flags.size(); i++) {
43284328
if (i != 0)
4329-
ostrm << " "; // Separator is whitespace
4329+
ostrm << " "; // Separator is whitespace
43304330
ostrm << region_info.flags[i];
43314331
}
43324332
ostrm << ";";

0 commit comments

Comments
 (0)