bugGNU Octave - Bugs: bug #64729, Octave segfault when running the...

 
 

bug #64729: Octave segfault when running the fft r2c transform

Submitter:  Hg200 <hg200>
Submitted:  Sat 30 Sep 2023 01:27:22 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  hg200 Open/Closed:  * Closed
Release:  * 8.3.0 Operating System:  * Any
Fixed Release:  8.4.0 Planned Release:  8.4.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 02 Oct 2023 10:42:36 AM UTC, comment #3: 

Thanks for checking.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Sun 01 Oct 2023 08:25:25 PM UTC, comment #2: 

Thank you very much for this very fast patch. Build and "make check"  without problem. Also no more segfaults during stress tests. I think this bug report can be closed.

Hg200 <hg200>
Sun 01 Oct 2023 03:59:11 PM UTC, comment #1: 

Thank you for the report and the analysis.

I added test cases (that crashed for me without this change) and pushed your suggested change to the stable branch:
https://hg.savannah.gnu.org/hgweb/octave/rev/65e27afd86a2

It should be part of Octave 8.4.0 if there is another release before Octave 9.

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Sat 30 Sep 2023 01:27:22 PM UTC, original submission:  

Hello all.

Running the attached script segfaults octave. I strongly suspect an insufficient memory allocation as root cause, since "howmany" can be greater than one. Changing following statement solves the problem for me: The command


OCTAVE_LOCAL_BUFFER (double, itmp, nn + 32);


should be rather


OCTAVE_LOCAL_BUFFER (double, itmp, nn * howmany + 32);


It can be found at:

https://hg.savannah.gnu.org/hgweb/octave/file/43d010974a89/liboctave/numeric/oct-fftw.cc#l369

Note that this instance exists two times: There is one implementation for double as well as single (float) precision.


Hg200 <hg200>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55180:  test_fft.m added by hg200 (286B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by hg200 (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-02 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-10-01 mmuetzel Item GroupNone Segfault, Bus Error, etc.
        StatusNone Ready For Test
        Releaseother 8.3.0
        Fixed ReleaseNone 8.4.0
        Planned ReleaseNone 8.4.0
    2023-09-30 hg200 Attached File- Added test_fft.m, #55180

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code