error code (info) problem in dsy*.f

Post here if you want to report a bug to the LAPACK team

error code (info) problem in dsy*.f

Postby malxyz2 » Tue Dec 25, 2012 2:39 pm

dsyevx.f line 505
IF( INFO.EQ.0 ) THEN
IMAX = M
ELSE
IMAX = INFO - 1
END IF
IMAX should not be set to INFO.
It is always = M

Also the call to CALL DSTEIN may clobber info.

dsygvx.f:418
IF( INFO.GT.0 )
$ M = INFO - 1
M is set properly in DSYEVX no need to do this

dsyevr.f:590 No need to set M=N, it should be set by DSTEBZ
IF( INFO.EQ.0 ) THEN
* Everything worked. Skip DSTEBZ/DSTEIN. IWORK(:) are
* undefined.
M = N
dsyevr.f:633
IF( INFO.EQ.0 ) THEN
IMAX = M
ELSE
IMAX = INFO - 1
END IF
also incorrect IMAX & INFO

there are many similar places in Lapack
Last edited by malxyz2 on Fri Dec 28, 2012 7:23 am, edited 1 time in total.
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm

Re: error code (info) problem in dsy*.f

Postby malxyz2 » Fri Dec 28, 2012 7:08 am

I cannot post more details, I just get
"This message was flagged as spam and has been denied."
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm

Re: error code (info) problem in dsy*.f

Postby malxyz2 » Fri Dec 28, 2012 7:09 am

Trying to bypass spam filter

I would like to emphasize that using error code (info)
as array index in .f examples mentioned above (there are also other places doing this)
is conceptually wrong.
The error code may change its value during program modifications,
may have negative value etc.
You cannot use error code as array index. Especially without limit checks.
There is a clear error in dsyevr.f 636

IF( ISCALE.EQ.1 ) THEN
IF( INFO.EQ.0 ) THEN
IMAX = M
ELSE
IMAX = INFO - 1
END IF

because INFO can be clobbered in
dsyevr.f 614 CALL DSTEIN( N, WORK( INDD ), WORK( INDE ), M, W,....INFO)

Other places are also potentially erroneous. Some of them buggy.
Anyway using error code (INFO) as array index is just plain conceptually wrong.
Last edited by malxyz2 on Fri Dec 28, 2012 7:20 am, edited 3 times in total.
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm

Postby malxyz2 » Fri Dec 28, 2012 7:10 am

- -
Last edited by malxyz2 on Fri Dec 28, 2012 7:17 am, edited 2 times in total.
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm

spam filter

Postby malxyz2 » Fri Dec 28, 2012 7:12 am

By the way. Your board spam filter reacts on dsyevr.f:614
replacing ":" by space allowed to bypass it.
Can you also fix that.
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm

Re: error code (info) problem in dsy*.f

Postby admin » Fri Dec 28, 2012 12:06 pm

dsyevr.f:614
admin
Site Admin
 
Posts: 499
Joined: Wed Dec 08, 2004 7:07 pm

Re: error code (info) problem in dsy*.f

Postby admin » Sat Dec 29, 2012 12:12 am

Word test: dsyevr.f:614
admin
Site Admin
 
Posts: 499
Joined: Wed Dec 08, 2004 7:07 pm

Re: error code (info) problem in dsy*.f

Postby malxyz2 » Sat Dec 29, 2012 11:41 am

very strange. I took my original post
viewtopic.php?f=13&t=4208#p10081
and replaced there
dsyevr.f 636 -> dsyevr.f:636
dsyevr.f 614 -> dsyevr.f:614
before the board report my post as a spam.
No such message happened now.

Anyway, this spam issue is minor.
Can you look at the problem of using error code
as array index. This may lead to serious memory corruption issues.
malxyz2
 
Posts: 9
Joined: Tue Dec 25, 2012 2:28 pm


Return to Bug report

Who is online

Users browsing this forum: No registered users and 1 guest