Skip to content

Commit 03c9ac9

Browse files
committed
[test] fix buffer overflow in 32-bit device testing
1 parent 7f4caed commit 03c9ac9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

validation-test/stdlib/UnsafeBufferPointerSlices.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,9 @@ UnsafeMutableRawBufferPointerSliceTests.test(
598598
UnsafeMutableRawBufferPointerSliceTests.test(
599599
"slice.of.UnsafeMutableRawBufferPointer.loadUnaligned"
600600
) {
601-
let count = 4
602-
let sizeInBytes = count * MemoryLayout<Int>.stride
601+
let sizeInBytes = 32
603602
let b = UnsafeMutableRawBufferPointer.allocate(
604-
byteCount: sizeInBytes, alignment: MemoryLayout<Int>.alignment
603+
byteCount: sizeInBytes, alignment: 4
605604
)
606605
defer {
607606
b.deallocate()

0 commit comments

Comments
 (0)