Skip to content

Commit 7aba3a2

Browse files
committed
Fix __m64i::loadu_si method reading past buffer end
Detected with address sanitizer :)
1 parent 62bcd44 commit 7aba3a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Vector for __m64i {
8686
#[inline]
8787
#[target_feature(enable = "avx2")]
8888
unsafe fn loadu_si(a: *const Self) -> Self {
89-
__m64i(_mm_loadu_si128(a as *const std::arch::x86_64::__m128i))
89+
__m64i(_mm_set_epi64x(0, std::ptr::read_unaligned(a as *const i64)))
9090
}
9191

9292
#[inline]

0 commit comments

Comments
 (0)