[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unidentified subject!
From: |
John W. Eaton |
Subject: |
Unidentified subject! |
Date: |
Thu, 14 Dec 2000 01:55:52 -0600 |
On 9-Dec-2000, john <address@hidden> wrote:
| To: address@hidden
| Cc:
| Subject: Octave from Recent CVS: Segmentation fault
|
| Bug report for Octave 2.1.31 configured for %OCTAVE_CANONICAL_HOST_TYPE%
| (CVS 9 December 2000)
|
| Description:
| -----------
|
| The following not at all useful code causes a Segmentation fault:
|
| arrow2 [544] octave
| GNU Octave, version 2.1.31 (i586-pc-linux-gnulibc1).
| Copyright (C) 1996, 1997, 1998, 1999, 2000 John W. Eaton.
| This is free software with ABSOLUTELY NO WARRANTY.
| For details, type `warranty'.
|
| *** This is a development version of Octave. Development releases
| *** are provided for people who want to help test, debug, and improve
| *** Octave.
| ***
| *** If you want a stable, well-tested version of Octave, you should be
| *** using one of the stable releases (when this development release
| *** was made, the latest stable version was 2.0.16).
|
| INFO_FILE = /usr/local/info/octave.info
| octave:1> xx = linspace(-3,10)';
| octave:2> xx / (pi+xx)
| panic: Segmentation fault -- stopping myself...
| attempting to save variables to `octave-core'...
| save to `octave-core' complete
| Segmentation fault
For cases like this, Octave eventually calls dgelss from Lapack. The
crash was happening inside dgemm, but it looks like a bug in Lapack
that can cause the bounds of a work array to be exceeded.
I checked netlib and the development version of Octave seems to have
the latest Lapack routines, so I don't think this problem has been
fixed in the Lapack code that is currently being distributed netlib.
Anyway, my best guess at a fix is appended.
Thanks,
jwe
2000-12-14 John W. Eaton <address@hidden>
* lapack/dgelss.f (DGELSS): Use correct leading dimension for
workspace array passed to dgemm and dlacpy.
(ZGELSS): Likewise, for calls to zgemm and zlacpy.
Index: dgelss.f
===================================================================
RCS file: /usr/local/cvsroot/octave/libcruft/lapack/dgelss.f,v
retrieving revision 1.3
diff -u -r1.3 dgelss.f
--- dgelss.f 2000/02/10 09:26:48 1.3
+++ dgelss.f 2000/12/14 07:45:56
@@ -491,8 +491,8 @@
DO 40 I = 1, NRHS, CHUNK
BL = MIN( NRHS-I+1, CHUNK )
CALL DGEMM( 'T', 'N', M, BL, M, ONE, WORK( IL ), LDWORK,
- $ B( 1, I ), LDB, ZERO, WORK( IWORK ), N )
- CALL DLACPY( 'G', M, BL, WORK( IWORK ), N, B( 1, I ),
+ $ B( 1, I ), LDB, ZERO, WORK( IWORK ), M )
+ CALL DLACPY( 'G', M, BL, WORK( IWORK ), M, B( 1, I ),
$ LDB )
40 CONTINUE
ELSE
Index: zgelss.f
===================================================================
RCS file: /usr/local/cvsroot/octave/libcruft/lapack/zgelss.f,v
retrieving revision 1.3
diff -u -r1.3 zgelss.f
--- zgelss.f 2000/02/10 09:26:50 1.3
+++ zgelss.f 2000/12/14 07:46:02
@@ -512,8 +512,8 @@
DO 40 I = 1, NRHS, CHUNK
BL = MIN( NRHS-I+1, CHUNK )
CALL ZGEMM( 'C', 'N', M, BL, M, CONE, WORK( IL ), LDWORK,
- $ B( 1, I ), LDB, CZERO, WORK( IWORK ), N )
- CALL ZLACPY( 'G', M, BL, WORK( IWORK ), N, B( 1, I ),
+ $ B( 1, I ), LDB, CZERO, WORK( IWORK ), M )
+ CALL ZLACPY( 'G', M, BL, WORK( IWORK ), M, B( 1, I ),
$ LDB )
40 CONTINUE
ELSE