Browse Source

Multiply instead of doing a left shift of a potentially negative number

fixes GCC ubsan report in the BLAS tests
tags/v0.3.11^2
Martin Kroeker GitHub 5 years ago
parent
commit
0ef4b3f1f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      kernel/x86_64/cgemv_t_4.c

+ 3
- 3
kernel/x86_64/cgemv_t_4.c View File

@@ -233,9 +233,9 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r, FLOAT alpha_i,
if ( m < 1 ) return(0);
if ( n < 1 ) return(0);

inc_x <<= 1;
inc_y <<= 1;
lda <<= 1;
inc_x *= 2;
inc_y *= 2;
lda *= 2;
lda4 = lda << 2;

xbuffer = buffer;


Loading…
Cancel
Save