octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54280] audiowrite crash for some long data fo


From: Rik
Subject: [Octave-bug-tracker] [bug #54280] audiowrite crash for some long data for mono OGG
Date: Tue, 10 Jul 2018 11:31:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #3, bug #54280 (project octave):

Here is a relevant backtrace.  The segfault is in an external library.


octave:1> audiowrite ("1.ogg", rand(2100000,1), 8000)

Thread 4 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcd227700 (LWP 3575)]
0x00007fffd1617b3d in ?? () from /usr/lib/x86_64-linux-gnu/libvorbis.so.0
(gdb) bt
#0  0x00007fffd1617b3d in ?? () from /usr/lib/x86_64-linux-gnu/libvorbis.so.0
#1  0x00007fffd1618878 in vorbis_analysis_wrote () from
/usr/lib/x86_64-linux-gnu/libvorbis.so.0
#2  0x00007fffd218ea89 in ?? () from
/usr/lib/x86_64-linux-gnu/libsndfile.so.1
#3  0x00007fffd218ecf5 in ?? () from
/usr/lib/x86_64-linux-gnu/libsndfile.so.1
#4  0x00007fffd2171f51 in sf_write_float () from
/usr/lib/x86_64-linux-gnu/libsndfile.so.1
#5  0x00007fffc6bbb30d in Faudiowrite (args=...) at
libinterp/dldfcn/audioread.cc:457


In the debugger, the only problematic value looks like chunk_size which seems
to be the original 2100000 - 2850 header.

#5  0x00007fffc6bbb30d in Faudiowrite (args=...) at
libinterp/dldfcn/audioread.cc:457
457           sf_count_t items_written = sf_write_float (file, data+offset,
chunk_size);
(gdb) p chunk_size
$1 = 2097150
(gdb) p offset
$2 = 0

Looking at /usr/include/sndfile.h for the definition of sf_count_t, it is a
64-bit integer and is definitely large enough to handle this.


typedef int64_t sf_count_t ;
#define SF_COUNT_MAX            0x7FFFFFFFFFFFFFFFLL


This sure looks like a problem with the actual libvorbis library or libsndfile
library, i.e., an upstream bug.

Maybe use Google to see if someone has reported a bug against one of those
libraries.  A definitive test would be to write a small C++ program to call
libsndfile directly with this large value and see if that too crashes.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54280>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]