Skip to content

Commit fca1298

Browse files
Fix q3_K dot product error in test-quantize-fns on s390x
Array q8bytes had only 4 elements allocated, but 8 elements accessed. This lead to write out of bounds and later read of overwritten values out of bounds and incorrect result.
1 parent 91d4387 commit fca1298

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/arch/s390/quants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ void ggml_vec_dot_q3_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
638638
uint8x16_t q3h[4];
639639
uint8x16_t q3b[2];
640640
int8x16_t q3bytes[4];
641-
int8x16_t q8bytes[4];
641+
int8x16_t q8bytes[8];
642642
uint8x16_t qhbits[2];
643643

644644
float sum = 0;

0 commit comments

Comments
 (0)