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

 
 

bug #35835: Crash on error with pchip

Submitted by:  Nir Krakauer <nir_krakauer>
Submitted on:  Wed 14 Mar 2012 03:17:58 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: Nir KrakauerOpen/Closed: Closed
Release: 3.6.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

I noticed a corresponding segfault with

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:

Okay, I pushed it:

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

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
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>
Project 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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by nir_krakauer (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 14 Mar 2012 05:37:00 PM UTCjordighStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Wed 14 Mar 2012 03:52:01 PM UTCjordighAttached File-=>Added pchip.diff, #25365
      StatusNone=>Patch Submitted
      Assigned toNone=>jordigh

    Back to the top


    Powered by Savane 3.1-cleanup1