Tremor issueshttps://gitlab.xiph.org/xiph/tremor/-/issues2017-09-02T15:25:02Zhttps://gitlab.xiph.org/xiph/tremor/-/issues/2296tremor: multiple invalid shift operations2017-09-02T15:25:02Zhannotremor: multiple invalid shift operationsThere are multiple invalid shift operations in the tremor codec.
To reproduce build tremor with clang and -fsanitize=undefined (undefined behavior sanitizer or ubsan). Then compile ivorbisfile_example.c that comes with it and pass the a...There are multiple invalid shift operations in the tremor codec.
To reproduce build tremor with clang and -fsanitize=undefined (undefined behavior sanitizer or ubsan). Then compile ivorbisfile_example.c that comes with it and pass the attached ogg file. Setting UBSAN_OPTIONS="print_stacktrace=1" gives a better output with stack traces.
Output from ubsan:
```
sharedbook.c:420:21: runtime error: left shift of 16 by 27 places cannot be represented in type 'int'
#0 0x53fdf3 in vorbis_book_init_decode /f/tremor/Tremor/sharedbook.c:420:21
#1 0x520f00 in _vds_init /f/tremor/Tremor/block.c:169:10
#2 0x520f00 in vorbis_synthesis_init /f/tremor/Tremor/block.c:229
#3 0x5173be in _make_decode_ready /f/tremor/Tremor/vorbisfile.c:595:8
#4 0x517925 in _fetch_and_process_packet /f/tremor/Tremor/vorbisfile.c:679:15
#5 0x51ad9d in ov_read /f/tremor/Tremor/vorbisfile.c:1934:15
#6 0x50aa11 in main (/f/tremor/Tremor/a.out+0x50aa11)
#7 0x7fcfccf8478f in __libc_start_main (/lib64/libc.so.6+0x2078f)
#8 0x419cc8 in _start (/f/tremor/Tremor/a.out+0x419cc8)
SUMMARY: AddressSanitizer: undefined-behavior sharedbook.c:420:21 in
misc.h:242:6: runtime error: left shift of negative value -134217728
#0 0x53d303 in VFLOAT_ADD /f/tremor/Tremor/./misc.h:242:6
#1 0x53a8a3 in _book_unquantize /f/tremor/Tremor/sharedbook.c:230:10
#2 0x53e493 in vorbis_book_init_decode /f/tremor/Tremor/sharedbook.c:383:18
#3 0x520f00 in _vds_init /f/tremor/Tremor/block.c:169:10
#4 0x520f00 in vorbis_synthesis_init /f/tremor/Tremor/block.c:229
#5 0x5173be in _make_decode_ready /f/tremor/Tremor/vorbisfile.c:595:8
#6 0x517925 in _fetch_and_process_packet /f/tremor/Tremor/vorbisfile.c:679:15
#7 0x51ad9d in ov_read /f/tremor/Tremor/vorbisfile.c:1934:15
#8 0x50aa11 in main (/f/tremor/Tremor/a.out+0x50aa11)
#9 0x7fcfccf8478f in __libc_start_main (/lib64/libc.so.6+0x2078f)
#10 0x419cc8 in _start (/f/tremor/Tremor/a.out+0x419cc8)
SUMMARY: AddressSanitizer: undefined-behavior misc.h:242:6 in
misc.h:77:68: runtime error: left shift of negative value -1
#0 0x546c70 in MULT31_SHIFT15 /f/tremor/Tremor/./misc.h:77:68
#1 0x546c70 in render_line /f/tremor/Tremor/floor1.c:323
#2 0x546c70 in floor1_inverse2 /f/tremor/Tremor/floor1.c:442
#3 0x558f86 in mapping0_inverse /f/tremor/Tremor/mapping0.c:285:5
#4 0x51799a in _fetch_and_process_packet /f/tremor/Tremor/vorbisfile.c:697:15
#5 0x51ad9d in ov_read /f/tremor/Tremor/vorbisfile.c:1934:15
#6 0x50aa11 in main (/f/tremor/Tremor/a.out+0x50aa11)
#7 0x7fcfccf8478f in __libc_start_main (/lib64/libc.so.6+0x2078f)
#8 0x419cc8 in _start (/f/tremor/Tremor/a.out+0x419cc8)
SUMMARY: AddressSanitizer: undefined-behavior misc.h:77:68 in
misc.h:71:21: runtime error: left shift of negative value -42347
#0 0x560d2f in MULT31 /f/tremor/Tremor/./misc.h:71:21
#1 0x560d2f in XPROD31 /f/tremor/Tremor/./misc.h:153
#2 0x55a3a5 in mdct_backward /f/tremor/Tremor/mdct.c:362:5
#3 0x55930d in mapping0_inverse /f/tremor/Tremor/mapping0.c:296:5
#4 0x51799a in _fetch_and_process_packet /f/tremor/Tremor/vorbisfile.c:697:15
#5 0x51ad9d in ov_read /f/tremor/Tremor/vorbisfile.c:1934:15
#6 0x50aa11 in main (/f/tremor/Tremor/a.out+0x50aa11)
#7 0x7fcfccf8478f in __libc_start_main (/lib64/libc.so.6+0x2078f)
#8 0x419cc8 in _start (/f/tremor/Tremor/a.out+0x419cc8)
SUMMARY: AddressSanitizer: undefined-behavior misc.h:71:21 in
misc.h:71:21: runtime error: left shift of negative value -4
#0 0x52a0c8 in MULT31 /f/tremor/Tremor/./misc.h:71:21
#1 0x52a0c8 in _vorbis_apply_window /f/tremor/Tremor/window.c:76
#2 0x55965f in mapping0_inverse /f/tremor/Tremor/mapping0.c:306:7
#3 0x51799a in _fetch_and_process_packet /f/tremor/Tremor/vorbisfile.c:697:15
#4 0x51ad9d in ov_read /f/tremor/Tremor/vorbisfile.c:1934:15
#5 0x50aa11 in main (/f/tremor/Tremor/a.out+0x50aa11)
#6 0x7fcfccf8478f in __libc_start_main (/lib64/libc.so.6+0x2078f)
#7 0x419cc8 in _start (/f/tremor/Tremor/a.out+0x419cc8)
```
Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/tremor/-/issues/2176Xiph Tremor code for Ogg decoder2017-09-02T15:25:02ZSonaliXiph Tremor code for Ogg decoderI'm using Xiph Tremor code for OGG-Vorbis decoder.
When 1Khz base frequency with 0db amplitude input signal is given to OGG-Vorbis decoder, clipping is observed in decoded PCM output.
Also in frequency analyzer tool, frequency spectrum o...I'm using Xiph Tremor code for OGG-Vorbis decoder.
When 1Khz base frequency with 0db amplitude input signal is given to OGG-Vorbis decoder, clipping is observed in decoded PCM output.
Also in frequency analyzer tool, frequency spectrum of decoded PCM output has harmonic distortions.
When same input is given to VLC player, output sound is good and frequency response of output is not having any distortions.
Has anyone come across such behavior?
any solution for this?
Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/tremor/-/issues/1922Build with automake-1.13 broken2017-09-02T15:25:02ZMarko LindqvistBuild with automake-1.13 brokenAutomake-1.13 removed long obsolete AM_CONFIG_HEADER completely ( http://lists.gnu.org/archive/html/automake/2012-12/msg00038.html ) and errors out upon seeing it.
Attached patch replaces it with proper AC_CONFIG_HEADERS.
----
I'm ma...Automake-1.13 removed long obsolete AM_CONFIG_HEADER completely ( http://lists.gnu.org/archive/html/automake/2012-12/msg00038.html ) and errors out upon seeing it.
Attached patch replaces it with proper AC_CONFIG_HEADERS.
----
I'm mass-submitting automake-1.13 fixes. Please see what you can do so
I don't need to do the same when automake-1.14 comes out:
http://cazfi.livejournal.com/195108.htmlMonty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/tremor/-/issues/1849Warnings in Tremor2017-09-02T15:25:02ZAndrew ChurchWarnings in TremorThe attached patch against SVN r18145 corrects a number of compiler warnings with "gcc -Wall -Wempty-body -Wmissing-declarations -Wpointer-arith -Wstrict-prototypes" on GCC 4.6.1:
- Adds the ov_fopen() declaration to ivorbisfile.h (sinc...The attached patch against SVN r18145 corrects a number of compiler warnings with "gcc -Wall -Wempty-body -Wmissing-declarations -Wpointer-arith -Wstrict-prototypes" on GCC 4.6.1:
- Adds the ov_fopen() declaration to ivorbisfile.h (since it seems intended to be exported).
- #includes block.h in block.c to fix missing-declaration warnings.
- Adds "static" to internal functions which don't have it: res[012]_*() in res012.c, _make_words() and _book_unquantize() in sharedbook.c, and rescale64() in vorbisfile.c.
- Deletes the unused variable j from vorbis_book_decodev_set() in codebook.c.
This patch doesn't address the int vs. ogg_uint32_t problem with serial numbers that I raised in issue 1838; I'll open that as a separate issue.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/tremor/-/issues/1826Crash in libtremor when playing an ogg file with mpd2017-09-02T15:25:02ZRaphael Kubo da CostaCrash in libtremor when playing an ogg file with mpdI first reported this crash in mpd's bug tracker [1], but was told it is a bug in libtremor itself.
After updating mpd a few months ago, whenever I try to play ogg files with libtremor support enabled, I get the following backtrace:
``...I first reported this crash in mpd's bug tracker [1], but was told it is a bug in libtremor itself.
After updating mpd a few months ago, whenever I try to play ogg files with libtremor support enabled, I get the following backtrace:
```
#0 vorbis_synthesis (vb=0x7fffff9fdbe0, op=<value optimized out>,
decodep=<value optimized out>) at synthesis.c:70
#1 0x0000000802165bbd in _fetch_and_process_packet (vf=0x7fffff9fdae0, readp=1, spanp=1)
at vorbisfile.c:505
#2 0x0000000802165e02 in ov_read (vf=0x7fffff9fdae0,
buffer=0x7fffff9fcaa0 "\304", <incomplete sequence \346\035>, bytes_req=4096,
bitstream=0x7fffff9fdaac) at vorbisfile.c:1553
#3 0x000000000041cb4c in vorbis_stream_decode (decoder=0x7fffff9fddf0,
input_stream=0x80dc40f40) at src/decoder/vorbis_decoder_plugin.c:327
#4 0x0000000000435cf6 in decoder_plugin_stream_decode (plugin=0x4600e0,
decoder=0x7fffff9fddf0, is=0x80dc40f40) at src/decoder_plugin.h:137
#5 0x0000000000435c6c in decoder_stream_decode (plugin=0x4600e0,
decoder=0x7fffff9fddf0, input_stream=0x80dc40f40) at src/decoder_thread.c:125
#6 0x000000000043637f in decoder_run_file (decoder=0x7fffff9fddf0,
path_fs=0x80dc0df00 "/data/mp3/Dream Theater/Awake/Dream Theater - Awake - 02 - Caught in a Web.ogg") at src/decoder_thread.c:348
#7 0x00000000004364ed in decoder_run_song (dc=0x7fffffbfef00, song=0x8093a5ee0,
uri=0x80dc0df00 "/data/mp3/Dream Theater/Awake/Dream Theater - Awake - 02 - Caught in a Web.ogg") at src/decoder_thread.c:390
#8 0x00000000004366c6 in decoder_run (dc=0x7fffffbfef00) at src/decoder_thread.c:435
#9 0x00000000004367c3 in decoder_task (arg=0x7fffffbfef00) at src/decoder_thread.c:463
#10 0x00000008039e4096 in ?? () from /usr/local/lib/libglib-2.0.so.0
#11 0x000000080408a4e1 in ?? () from /lib/libthr.so.3
```
This is libtremor-1.0.2.02132004.
[1] http://musicpd.org/mantis/view.php?id=3176Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/tremor/-/issues/1690Detect if GCC builds for ARM2017-09-02T15:25:02ZRafaël CarréDetect if GCC builds for ARMCurrently configure relies on the host "triplet" to detect arm targets
I don't know if it could be possible to use custom triplets to fool this detection, so I propose to rely on the fact that gcc always defines __arm__ insteadCurrently configure relies on the host "triplet" to detect arm targets
I don't know if it could be possible to use custom triplets to fool this detection, so I propose to rely on the fact that gcc always defines __arm__ insteadMonty MontgomeryMonty Montgomery