[Pkg-octave-devel] Bug#369545: octave: crashes (glibc detected double free or corruption)

Jochen Voss voss at debian.org
Tue May 30 14:32:50 UTC 2006


Package: octave
Version: 1:2.1.73-8
Severity: normal

Hello,

if I place the following script (needs ocatave-forge) in the current
directory

== laplace1.m starts here ============================================
function L = laplace1(n,du,alpha)
% LAPLACE1 Laplace operator with one-step Dirichlet boundary conditions
%L = diag(ones(n-1,1)/(du*du),-1) \
%    + diag(-2*ones(n,1)/(du*du),0) \
%    + diag(ones(n-1,1)/(du*du),+1);
B=[ones(n,1) (-2*ones(n,1)) ones(n,1)]/(du*du);
L=spdiags(B,[-1,0,1],n,n);
L(1,1)=-1/(du*du)+alpha/du;
L(n,n)=-1/(du*du);
======================================================================

and then try to call this function, octave crashes:

    voss at burmah [~/project/kalman/assimilation/src/matlab] octave
    GNU Octave, version 2.1.73 (i486-pc-linux-gnu).
    Copyright (C) 2006 John W. Eaton.
    This is free software; see the source code for copying conditions.
    There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

    Additional information about Octave is available at http://www.octave.org.

    Please contribute if you find this software useful.
    For more information, visit http://www.octave.org/help-wanted.html

    Report bugs to <bug at octave.org> (but first, please read
    http://www.octave.org/bugs.html to learn how to write a helpful report).

    octave:1> a=laplace1(6,0.1,0)
    *** glibc detected *** double free or corruption (fasttop): 0x08ad1908 ***
    panic: Aborted -- stopping myself...
    attempting to save variables to `octave-core'...
    save to `octave-core' complete
    Aborted

This looks like a bug somewhere.

If I give the corresponding commands "by hand" instead, it seems to
work:

    voss at burmah [~/project/kalman/assimilation/src/matlab] octave
    GNU Octave, version 2.1.73 (i486-pc-linux-gnu).
    [...]

    octave:1> n=6
    n = 6
    octave:2> du=0.1
    du = 0.10000
    octave:3> alpha=0
    alpha = 0
    octave:4> B=[ones(n,1) (-2*ones(n,1)) ones(n,1)]/(du*du);
    octave:5> L=spdiags(B,[-1,0,1],n,n);
    octave:6> L(1,1)=-1/(du*du)+alpha/du;
    octave:7> L(n,n)=-1/(du*du);
    octave:8> L
    L =

      -100.00000   100.00000     0.00000     0.00000     0.00000     0.00000
       100.00000  -200.00000   100.00000     0.00000     0.00000     0.00000
	 0.00000   100.00000  -200.00000   100.00000     0.00000     0.00000
	 0.00000     0.00000   100.00000  -200.00000   100.00000     0.00000
	 0.00000     0.00000     0.00000   100.00000  -200.00000   100.00000
	 0.00000     0.00000     0.00000     0.00000   100.00000  -100.00000

If you need more information, please let me know.

I hope this helps,
Jochen

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.18
Locale: LANG=en_GB.iso885915, LC_CTYPE=en_GB.iso885915 (charmap=ISO-8859-15)

Versions of packages octave depends on:
ii  octave2.1                     1:2.1.73-8 GNU Octave language for numerical 

octave recommends no packages.

-- no debconf information




More information about the Pkg-octave-devel mailing list