bugGNU Octave - Bugs: bug #48078, [octave forge] (signal) crash in...

 
 

bug #48078: [octave forge] (signal) crash in remez with close frequency band values + differentiator

Submitted by:  None
Submitted on:  Wed 01 Jun 2016 03:17:04 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Thu 02 Jun 2016 03:40:21 AM UTC, comment #1: 

The current remez implementation has several bugs, including poor filter design, and apparently this crash. Please try patch #8535 for a remez replacement, it has been reported to work with your example.

Mike Miller <mtmiller>
Project Administrator
Wed 01 Jun 2016 03:17:04 PM UTC, original submission:  

Hi,

I've found that, when using remez function from the forge package « signal », if you give frequencies at the band edges too close from each other (as in testcase.m), octave segfaults.

I've located the problem in remez.cc, l612-624:

for (i=0; i<numband; i++)
    {
      gridsize += (int)(2*r*griddensity*(bands[2*i+1] - bands[2*i]) + .5);
    }
  if (symmetry == NEGATIVE)
    {
      gridsize--;
    }

  Grid = (double *)malloc(gridsize * sizeof(double));

If 2*r*griddensity*(bands[2*i+1] - bands[2*i] <= 0.4, and the symmetry is NEGATIVE (like in a differentiator), then gridsize = -1, and Grid points to NULL, so octave crashes as soon as something tries to access it (like in CreateDenseGrid).

I believe there should be a size check somewhere, but as I don't really now how does remez work, I don't want to suggest something wrong.

Thanks!

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37331:  testcase.m added by None (269B - application/octet-stream)
file #37332:  gdbdump added by None (7KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-27 mtmiller Carbon-CopyRemoved 80942 => -
    2018-05-01 mtmiller Release4.0.2 => dev
    2017-08-13 jwe Summarysignal package: crash in remez with close frequency band values + differentiator => [octave forge] (signal) crash in remez with close frequency band values + differentiator
    2016-06-02 mtmiller StatusNone => Confirmed
        SummaryCrash when using signal's remez function for close frequency band values + differentiator => signal package: crash in remez with close frequency band values + differentiator
    2016-06-01 None Attached File- => Added testcase.m, #37331
        Attached File- => Added gdbdump, #37332

    Back to the top


    Powered by Savane 3.5