Skip to content

Commit 9cabe07

Browse files
authored
Merge pull request swiftlang#30263 from milseman/malloc_san
[test] Disable allocator-specific test portion
2 parents 3f69d6b + 5236224 commit 9cabe07

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/stdlib/NewStringAppending.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,18 @@ print("\(repr(s))")
121121
// CHECK-LABEL: (expecting third reallocation)
122122
print("(expecting third reallocation)")
123123

124-
// CHECK-NEXT: String(Native(owner: @[[storage3:[x0-9a-f]+]], count: 72, capacity: 135))
125-
// CHECK-NOT: @[[storage2]],
124+
// FIXME: Now that test behavior depends on result of malloc_size, we should
125+
// rewrite this test for larger allocations. For now, disable the hard-coded
126+
// checks.
127+
128+
// xCHECK-NEXT: String(Native(owner: @[[storage3:[x0-9a-f]+]], count: 72, capacity: 135))
129+
// xCHECK-NOT: @[[storage2]],
126130
s += "1234567890123456"
127131
print("\(repr(s))")
128132

129133
var s1 = s
130134

131-
// CHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
135+
// xCHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
132136
print("\(repr(s1))")
133137

134138
/// The use of later buffer capacity by another string forces
@@ -137,19 +141,19 @@ print("\(repr(s1))")
137141
// CHECK-LABEL: (expect copy to trigger reallocation without growth)
138142
print("(expect copy to trigger reallocation without growth)")
139143

140-
// CHECK-NEXT: String(Native(owner: @[[storage4:[x0-9a-f]+]], count: 73, capacity: 87)) = "{{.*}}X"
144+
// CHECK-NEXT: String(Native(owner: @[[storage4:[x0-9a-f]+]], count: 73, capacity: 87)) = "{{.*}}X"
141145
// CHECK-NOT: @[[storage3]],
142146
s1 += "X"
143147
print("\(repr(s1))")
144148

145149
/// The original copy is left unchanged
146150

147-
// CHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
151+
// xCHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
148152
print("\(repr(s))")
149153

150154
/// Appending to an empty string re-uses the RHS
151155

152-
// CHECK-NEXT: @[[storage3]],
156+
// xCHECK-NEXT: @[[storage3]],
153157
var s2 = String()
154158
s2 += s
155159
print("\(repr(s2))")

0 commit comments

Comments
 (0)