bugGNU Octave - Bugs: bug #35835, Crash on error with pchip

 
 

bug #35835: Crash on error with pchip

Submitter:  Nir Krakauer <nir_krakauer>
Submitted:  Wed 14 Mar 2012 03:17:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  jordigh
Originator Name:  Nir Krakauer Open/Closed:  * Closed
Release:  * 3.6.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 07 Mar 2014 02:38:48 PM UTC, comment #4: 

I noticed a corresponding segfault with


interp2(1:2, 2:-1:1, randn(2,2), (1:0.5:2)', 2:-0.5:1, 'pchip')


This happens each time one of the arguments is decreasing (consistent with the interp2 help which only requires them to be monotonic).

Muhali <muhali>
Wed 14 Mar 2012 05:37:00 PM UTC, comment #3: 
Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 14 Mar 2012 04:21:34 PM UTC, comment #2: 

I would patch to stable.  This is from JWE's own guidance at (http://www.gnu.org/software/octave/bugs.html).

------
Have You Found a Bug?

If you are not sure whether you have found a bug, here are some guidelines:

    If Octave gets a fatal signal, for any input whatever, that is a bug. Reliable interpreters never crash.
------

Also of relevance, I just patched a segfault with named capture buffers in regular expressions and I chose the stable branch.  We would at least be consistent if we treat all segfaults as worthy of backporting.


Rik <rik5>
Group administrator
Wed 14 Mar 2012 03:52:01 PM UTC, comment #1: 

It's a pretty simple fix (attached), but I'm not sure if this should be applied to stable or not.

(file #25365)

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 14 Mar 2012 03:17:58 PM UTC, original submission:  

Calling pchip with scalar input leads to segmentation fault:

> pchip(1, 2, 3)

 ***MESSAGE FROM ROUTINE DPCHIM IN LIBRARY SLATEC.
 ***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED

  •  NUMBER OF DATA POINTS LESS THAN TWO
  •  ERROR NUMBER = -1
  •  

 ***END OF MESSAGE
 
 ***JOB ABORT DUE TO UNRECOVERED ERROR.

  1.          ERROR MESSAGE SUMMARY

 LIBRARY    SUBROUTINE MESSAGE START             NERR     LEVEL     COUNT
 SLATEC     DPCHIM     NUMBER OF DATA POINT        -1         1         1

Segmentation fault



interp1 with the same inputs returns an error message, which is a better outcome:

> interp1(1, 2, 3, 'pchip')

error: interp1: table too short
error: called from:
error:   /usr/share/octave/3.6.1/m/general/interp1.m at line 162, column 5


Nir Krakauer <nir_krakauer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #25365:  pchip.diff added by jordigh (946B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by nir_krakauer (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-14 jordigh StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2012-03-14 jordigh Attached File- Added pchip.diff, #25365
        StatusNone Patch Submitted
        Assigned toNone jordigh

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code