[Pkg-octave-devel] Bug#567975: Bug#567975: FP error when filtering an empty vector

John W. Eaton jwe at octave.org
Tue Feb 2 06:26:41 UTC 2010


On  1-Feb-2010, Bas Zoetekouw wrote:

| Octave crashes when trying to filter() an empty vector:
| 
| | octave:1> a=1; b=ones(10,1)/10; foo=filter(b,a,[]);
| | panic: Floating point exception -- stopping myself...
| | attempting to save variables to `octave-core'...
| | save to `octave-core' complete
| | zsh: floating point exception  octave
| 
| and I'm dropped back into the shell...
| 
| Of course, filtering an empty vector doesnt make much sense, but it certainly
| shouldn't cause a crash.
| FWIT, Matlab simple returns an empty vector.
| 
| -- System Information:
| Debian Release: 5.0.4
|   APT prefers stable
|   APT policy: (500, 'stable')
| Architecture: amd64 (x86_64)
| 
| Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
| Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
| Shell: /bin/sh linked to /bin/bash

I checked in the following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/a277ba5da4dc

I'm not sure this fix places the return in exactly the right
location.  Should it be later in the function, after other dimension
checks?  It would be nice if someone who is more familiar with how
filter is expected to work would comment.

Also, in the future, please report bugs in Octave itself directly to
the bug at octave.org mailing list and use the Debian bug reporting
system for problems specific to the Debian package.

Thanks,

jwe





More information about the Pkg-octave-devel mailing list