Commit bug reported by Alexander Kobotov (INTEL) on LAPACK Forum
authorjulie <julielangou@users.noreply.github.com>
Sat, 18 Jul 2015 23:53:25 +0000 (23:53 +0000)
committerjulie <julielangou@users.noreply.github.com>
Sat, 18 Jul 2015 23:53:25 +0000 (23:53 +0000)
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4762&p=11439#p11439
Recent commit r1533 introduced out of bound access which could lead to a crash.
It results scaling of a vector instead of a single number.
Fix is simple:

zhgeqz.f:669
- CALL ZSCAL( ILAST, SIGNBC, H( ILAST, ILAST ), 1 )
+ CALL ZSCAL( 1, SIGNBC, H( ILAST, ILAST ), 1 )

Similar for chgeqz on line 668

SRC/chgeqz.f
SRC/zhgeqz.f

index 7d2e810d0677d25e07555bab90478f8828b8b870..3cfcaab249834fde14cbe9d51f5e89913ba50b12 100644 (file)
                CALL CSCAL( ILAST+1-IFRSTM, SIGNBC, H( IFRSTM, ILAST ),
      $                     1 )
             ELSE
-               CALL CSCAL( ILAST, SIGNBC, H( ILAST, ILAST ), 1 )
+               CALL CSCAL( 1, SIGNBC, H( ILAST, ILAST ), 1 )
             END IF
             IF( ILZ )
      $         CALL CSCAL( N, SIGNBC, Z( 1, ILAST ), 1 )
index 3df67545194a434edbfa20aac4da6c7b4d4ae112..2699e1edbb01c4252bcf416f92b5a5d7b57f0498 100644 (file)
                CALL ZSCAL( ILAST+1-IFRSTM, SIGNBC, H( IFRSTM, ILAST ),
      $                     1 )
             ELSE
-               CALL ZSCAL( ILAST, SIGNBC, H( ILAST, ILAST ), 1 )
+               CALL ZSCAL( 1, SIGNBC, H( ILAST, ILAST ), 1 )
             END IF
             IF( ILZ )
      $         CALL ZSCAL( N, SIGNBC, Z( 1, ILAST ), 1 )