Octave 3.0.1 crashes deterministically in __qp__.cc

John W. Eaton jwe at bevo.che.wisc.edu
Fri Jun 27 16:22:38 CDT 2008


On 27-Jun-2008, Joshua Redstone wrote:

| Hi all,I think I've found the bug, but I'm a bit skeptical.
| In __qp__.cc of octave 3.0.1, lines 358-365 read:
|                   for (octave_idx_type i = which_eig; i < n_act - n_eq; i++)
|                     {
|                       Wact(i) = Wact(i+1);
|                       for (octave_idx_type j = 0; j < n; j++)
|                         Aact(n_eq+i,j) = Aact(n_eq+i+1,j);
|                       bact(n_eq+i) = bact(n_eq+i+1);
|                     }
| 
| The loop over 'i' should be until (n_act - n_eq - 1) rather than (n_act -
| n_eq) as is written.
| As written, the loop accesses one element past the end of each of Wact,
| bact, and Aact.
| For exampe, Aact has n_act rows, but the expression (n_eq+i+1) will be to
| large when i = (n_act-n_eq-1).
| The reason I am a bit skeptical is that I would expect this problem to be
| causing crashes more frequently than observed.
| Thoughts?
| Josh

I think this problem has already been fixed in my sources, with the
attached changeset.

Mailing list thread here: http://www.nabble.com/panic%3A-Segmentation-violation----stopping-myself...-to16859691.html#a16865091

jwe

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080627/da72ea22/attachment.ksh 


More information about the Bug-octave mailing list