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

Bug#944017: libsoxr: autopkgtest regression: segmentation fault



Hello Adrian, hello Paul,
I could reproduce the issue in a minimal
revertable Unstable qemu VM with this command:

    /usr/bin/autopkgtest libsoxr -- null


As far as I see the test is called this way:

    src/debian/tests/inst-check
      src/inst-check
        src/inst-check-soxr
          $gen                    # line 43, generates test data
          $tmp/3-options-input-fn # line 43, run test

In the end it runs:

    dd if=/dev/urandom count=1000 | /tmp/tmp.bQI47Dtfhv/4-split-channels   7 6 2 2 3

Unfortunately the "inst-check" runs just in the
autopkgtest, but not at build time.


All debugging attempts led me to the location below.
And the lines soxr.c:664 and soxr.c:786 point to
the fix-unaligned-access.patch introduced in bug #942746.

When a packages are installed without this patch the
autopkgtest gets not segfault.

Kind regards,
Bernhard


Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x000000000485210a in lsx_rint16_clip_dither_f (seed0=0x4c51500, n=6735, src=0x4ca4270, dest0=0x4c241a0) at ./src/rint-clip.h:67
67          DO_16;
(gdb) bt
#0  0x000000000485210a in lsx_rint16_clip_dither_f (seed0=0x4c51500, n=6735, src=0x4ca4270, dest0=0x4c241a0) at ./src/rint-clip.h:67
#1  _soxr_interleave_f (data_type=<optimized out>, dest0=0x4c241a0, src=<optimized out>, n=6735, ch=1, seed=0x4c51500) at ./src/data-io.c:213
#2  0x000000000484d60f in soxr_output_1ch (p=p@entry=0x4c513e0, i=0, dest=dest@entry=0x4c24100, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
#3  0x000000000484d8cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
#4  0x0000000004bcaa42 in GOMP_parallel (fn=0x484d830 <soxr_process._omp_fn.0>, data=0x1fff000800, num_threads=4, flags=0) at ../../../src/libgomp/parallel.c:171
#5  0x000000000484ef78 in soxr_process (p=0x4c513e0, in=0x4c24150, ilen0=<optimized out>, idone0=0x0, out=0x4c24100, olen=6923, odone0=0x1fff0008a8) at ./src/soxr.c:781
#6  0x0000000000109fd8 in main (n=0, arg=0x1fff000b28) at 4-split-channels.c:142
# Unstable amd64 qemu VM 2019-12-12

apt update
apt dist-upgrade


apt install systemd-coredump mc autopkgtest quilt gdb rr valgrind libgomp1-dbgsym libsoxr0-dbgsym
apt build-dep libsoxr



##############


root@debian:~# autopkgtest libsoxr -- null
...
/tmp/tmp.LScD5ODKNY/3-options-input-fn no error; 0 clips; I/O: no error (cr32s)
Segmentation fault (core dumped)
autopkgtest [00:22:20]: test inst-check: -----------------------]
autopkgtest [00:22:21]: test inst-check:  - - - - - - - - - - results - - - - - - - - - -
inst-check           FAIL non-zero exit status 139
autopkgtest [00:22:21]: test inst-check:  - - - - - - - - - - stderr - - - - - - - - - -
Segmentation fault (core dumped)
...




root@debian:~# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Thu 2019-12-12 00:22:20 CET    2744     0     0  11 present   /tmp/tmp.LScD5ODKNY/4-split-channels



root@debian:~# journalctl --no-pager
Dez 12 00:22:20 debian kernel: 4-split-channel[2745]: segfault at 0 ip 00007f17b31ec10a sp 00007f17b2e79c50 error 6 in libsoxr.so.0.1.2[7f17b31e7000+28000]
Dez 12 00:22:20 debian kernel: Code: d0 48 89 94 24 d0 00 00 00 49 c1 e8 06 41 83 e0 1f 44 29 c7 f2 0f 2a c7 f2 0f 59 c1 f2 0f 58 c2 f2 0f 11 44 24 08 dd 44 24 08 <41> df 1e 48 89 c7 66 0f ef c0 66 0f ef d2 49 89 d0 48 c1 ef 09 49
Dez 12 00:22:20 debian systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Dez 12 00:22:20 debian systemd[1]: Started Process Core Dump (PID 2756/UID 0).
Dez 12 00:22:20 debian su[2651]: pam_unix(su:session): session closed for user root
Dez 12 00:22:20 debian systemd-coredump[2757]: Process 2744 (4-split-channel) of user 0 dumped core.
                                               
                                               Stack trace of thread 2745:
                                               #0  0x00007f17b31ec10a n/a (libsoxr.so.0 + 0x910a)
                                               #1  0x00007f17b31e760f n/a (libsoxr.so.0 + 0x460f)
                                               #2  0x00007f17b31e78cc n/a (libsoxr.so.0 + 0x48cc)
                                               #3  0x00007f17b2ec0946 n/a (libgomp.so.1 + 0x1a946)
                                               #4  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #5  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2753:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2747:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2748:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2750:
                                               #0  0x00007f17b2ec32ae n/a (libgomp.so.1 + 0x1d2ae)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2752:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2746:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2751:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2755:
                                               #0  0x00007f17b2ec32aa n/a (libgomp.so.1 + 0x1d2aa)
                                               #1  0x00007f17b2ec0952 n/a (libgomp.so.1 + 0x1a952)
                                               #2  0x00007f17b2e88fb7 start_thread (libpthread.so.0 + 0x8fb7)
                                               #3  0x00007f17b311d2df __clone (libc.so.6 + 0xfa2df)
                                               
                                               Stack trace of thread 2744:
                                               #0  0x00007f17b32047cf n/a (libsoxr.so.0 + 0x217cf)
                                               #1  0x00007f17b31f2bb5 n/a (libsoxr.so.0 + 0xfbb5)
                                               #2  0x00007f17b31f549b n/a (libsoxr.so.0 + 0x1249b)
                                               #3  0x00007f17b31e75bb n/a (libsoxr.so.0 + 0x45bb)
                                               #4  0x00007f17b31e78cc n/a (libsoxr.so.0 + 0x48cc)
                                               #5  0x00007f17b2eb7a42 GOMP_parallel (libgomp.so.1 + 0x11a42)
                                               #6  0x00007f17b31e8f78 soxr_process (libsoxr.so.0 + 0x5f78)
                                               #7  0x0000562a79f54fd8 n/a (/tmp/tmp.LScD5ODKNY/4-split-channels + 0x1fd8)
                                               #8  0x00007f17b3049bbb __libc_start_main (libc.so.6 + 0x26bbb)
                                               #9  0x0000562a79f5419a n/a (/tmp/tmp.LScD5ODKNY/4-split-channels + 0x119a)
Dez 12 00:22:20 debian systemd[1]: systemd-coredump@0-2756-0.service: Succeeded.






root@debian:~# coredumpctl gdb 2744                           
           PID: 2744 (4-split-channel)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Thu 2019-12-12 00:22:20 CET (3min 27s ago)
  Command Line: /tmp/tmp.LScD5ODKNY/4-split-channels 7 6 2 2 3
    Executable: /tmp/tmp.LScD5ODKNY/4-split-channels
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (benutzer)
       Boot ID: c56bdd58514a4b44bf9722341c64d304
    Machine ID: 33f18f39d2a9438eb75b0ed52848afcd
      Hostname: debian
       Storage: /var/lib/systemd/coredump/core.4-split-channel.0.c56bdd58514a4b44bf9722341c64d304.2744.1576106540000000000000.lz4
       Message: Process 2744 (4-split-channel) of user 0 dumped core.
                
...
warning: core file may not match specified executable file.
[New LWP 2745]
[New LWP 2753]
[New LWP 2747]
[New LWP 2748]
[New LWP 2750]
[New LWP 2752]
[New LWP 2746]
[New LWP 2751]
[New LWP 2755]
[New LWP 2744]
[New LWP 2754]
[New LWP 2749]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/tmp/tmp.LScD5ODKNY/4-split-channels 7 6 2 2 3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f17b31ec10a in lsx_rint16_clip_dither_f (seed0=0x562a7a986540, n=6735, src=0x562a7a9a48c0, dest0=0x562a7a95c8d6) at ./src/rint-clip.h:67
67      ./src/rint-clip.h: Datei oder Verzeichnis nicht gefunden.
[Current thread is 1 (Thread 0x7f17b2e7a700 (LWP 2745))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x00007f17b31ec10a in lsx_rint16_clip_dither_f (seed0=0x562a7a986540, n=6735, src=0x562a7a9a48c0, dest0=0x562a7a95c8d6) at ./src/rint-clip.h:67
#1  _soxr_interleave_f (data_type=<optimized out>, dest0=0x562a7a95c8d6, src=<optimized out>, n=6735, ch=1, seed=0x562a7a986540) at ./src/data-io.c:213
#2  0x00007f17b31e760f in soxr_output_1ch (p=p@entry=0x562a7a986420, i=1, dest=dest@entry=0x562a7a959280, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
#3  0x00007f17b31e78cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
#4  0x00007f17b2ec0946 in gomp_thread_start (xdata=<optimized out>) at ../../../src/libgomp/team.c:123
#5  0x00007f17b2e88fb7 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f17b311d2df in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)





##############

src/debian/tests/inst-check
  src/inst-check
    src/inst-check-soxr
      $gen                    # line 43, generates test data
      $tmp/3-options-input-fn # line 43, run test


##############


root@debian:~# autopkgtest libsoxr --shell -- null
...


inst-check-soxr:
-    cmd="$cc $cflags -o $out $f $libs -lm"
+    cmd="$cc $cflags -g -o $out $f $libs -lm"
-rm -rf $tmp
+#rm -rf $tmp


root@debian:/tmp/autopkgtest.Jem92T/build.GXv/src# debian/tests/inst-check 
...
/tmp/tmp.bQI47Dtfhv/3-options-input-fn no error; 0 clips; I/O: no error (cr32s)
Segmentation fault (core dumped)





root@debian:/tmp/autopkgtest.Jem92T/build.GXv/src# dd if=/dev/urandom count=1000 | /tmp/tmp.bQI47Dtfhv/4-split-channels   7 6 2 2 3
Speicherzugriffsfehler (Speicherabzug geschrieben)




root@debian:/tmp/autopkgtest.Jem92T/build.GXv/src# dd if=/dev/urandom count=1000 | catchsegv /tmp/tmp.bQI47Dtfhv/4-split-channels   7 6 2 2 3   
Segmentation fault (core dumped)
*** Segmentation fault
Register dump:

 RAX: 78c4aaf1ff002d2b   RBX: 00005563fdf0c8f0   RCX: 0000000000000000
 RDX: 2fbb00e8aaa3608e   RSI: 0000000000000000   RDI: 0000000000000012
 RBP: 00005563fdf0c8f0   R8 : 0000000000000002   R9 : 00005563fdeee570
 R10: 0000000000000000   R11: 00005563fdf0c8f0   R12: 00007fed70e63d28
 R13: 00005563fdec12b0   R14: 0000000000000000   R15: 0000000000001a40
 RSP: 00007fed70e63c50

 RIP: 00007fed711d610a   EFLAGS: 00010206

 CS: 0033   FS: 0000   GS: 0000

 Trap: 0000000e   Error: 00000006   OldMask: 00000000   CR2: 00000000

 FPUCW: 0000037f   FPUSW: 00003800   TAG: 00000080
 RIP: 00000000   RDP: 00000000

 ST(0) ffff 9ce3b80000000000   ST(1) 0000 0000000000000000
 ST(2) 0000 0000000000000000   ST(3) 0000 0000000000000000
 ST(4) 0000 0000000000000000   ST(5) 0000 0000000000000000
 ST(6) 0000 0000000000000000   ST(7) 0000 0000000000000000
 mxcsr: 1fa0
 XMM0:  000000000000000000000000b39c7700 XMM1:  000000000000000000000000b39c7700
 XMM2:  000000000000000000000000b39c7700 XMM3:  000000000000000000000000b39c7700
 XMM4:  000000000000000000000000b39c7700 XMM5:  000000000000000000000000b39c7700
 XMM6:  000000000000000000000000b39c7700 XMM7:  000000000000000000000000b39c7700
 XMM8:  000000000000000000000000b39c7700 XMM9:  000000000000000000000000b39c7700
 XMM10: 000000000000000000000000b39c7700 XMM11: 000000000000000000000000b39c7700
 XMM12: 000000000000000000000000b39c7700 XMM13: 000000000000000000000000b39c7700
 XMM14: 000000000000000000000000b39c7700 XMM15: 000000000000000000000000b39c7700

Backtrace:
/lib/x86_64-linux-gnu/libsoxr.so.0(+0x910a)[0x7fed711d610a]
/lib/x86_64-linux-gnu/libsoxr.so.0(+0x460f)[0x7fed711d160f]
/lib/x86_64-linux-gnu/libsoxr.so.0(+0x48cc)[0x7fed711d18cc]
/lib/x86_64-linux-gnu/libgomp.so.1(GOMP_parallel+0x42)[0x7fed70ea1a42]
/lib/x86_64-linux-gnu/libsoxr.so.0(soxr_process+0x268)[0x7fed711d2f78]
/tmp/tmp.bQI47Dtfhv/4-split-channels(+0x1fd8)[0x5563fda05563fd/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7fed71033bbb]
/tmp/tmp.bQI47Dtfhv/4-split-channels(+0x119a)[0x5563fda0c19a]

Memory map:
...






root@debian:/tmp/autopkgtest.Jem92T/build.GXv/src# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
...
Thu 2019-12-12 00:40:14 CET    3969     0     0  11 present   /tmp/tmp.bQI47Dtfhv/4-split-channels





root@debian:~# coredumpctl gdb 3969
           PID: 3969 (4-split-channel)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Thu 2019-12-12 00:40:13 CET (30s ago)
  Command Line: /tmp/tmp.bQI47Dtfhv/4-split-channels 7 6 2 2 3
    Executable: /tmp/tmp.bQI47Dtfhv/4-split-channels
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (benutzer)
       Boot ID: c56bdd58514a4b44bf9722341c64d304
    Machine ID: 33f18f39d2a9438eb75b0ed52848afcd
      Hostname: debian
       Storage: /var/lib/systemd/coredump/core.4-split-channel.0.c56bdd58514a4b44bf9722341c64d304.3969.1576107613000000000000.lz4
       Message: Process 3969 (4-split-channel) of user 0 dumped core.
                
                Stack trace of thread 3969:
                #0  0x00007fe51fe0010a lsx_rint16_clip_dither_f (libsoxr.so.0 + 0x910a)
                #1  0x00007fe51fdfb60f soxr_output_1ch (libsoxr.so.0 + 0x460f)
                #2  0x00007fe51fdfb8cc soxr_process._omp_fn.0 (libsoxr.so.0 + 0x48cc)
                #3  0x00007fe51facba42 GOMP_parallel (libgomp.so.1 + 0x11a42)
                #4  0x00007fe51fdfcf78 soxr_process (libsoxr.so.0 + 0x5f78)
                #5  0x000055d6dc52dfd8 n/a (/tmp/tmp.bQI47Dtfhv/4-split-channels + 0x1fd8)
                #6  0x00007fe51fc5dbbb __libc_start_main (libc.so.6 + 0x26bbb)
                #7  0x000055d6dc52d19a n/a (/tmp/tmp.bQI47Dtfhv/4-split-channels + 0x119a)

...
Reading symbols from /tmp/tmp.bQI47Dtfhv/4-split-channels...

warning: core file may not match specified executable file.
[New LWP 3969]
[New LWP 3978]
...
[New LWP 3970]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/tmp/tmp.bQI47Dtfhv/4-split-channels 7 6 2 2 3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fe51fe0010a in lsx_rint16_clip_dither_f (seed0=0x55d6dda7a540, n=6735, src=0x55d6dda88870, dest0=0x55d6dda4d2c0) at ./src/rint-clip.h:67
67      ./src/rint-clip.h: Datei oder Verzeichnis nicht gefunden.
[Current thread is 1 (Thread 0x7fe51fa8f7c0 (LWP 3969))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x00007fe51fe0010a in lsx_rint16_clip_dither_f (seed0=0x55d6dda7a540, n=6735, src=0x55d6dda88870, dest0=0x55d6dda4d2c0) at ./src/rint-clip.h:67
#1  _soxr_interleave_f (data_type=<optimized out>, dest0=0x55d6dda4d2c0, src=<optimized out>, n=6735, ch=1, seed=0x55d6dda7a540) at ./src/data-io.c:213
#2  0x00007fe51fdfb60f in soxr_output_1ch (p=p@entry=0x55d6dda7a420, i=0, dest=dest@entry=0x55d6dda4d280, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
#3  0x00007fe51fdfb8cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
#4  0x00007fe51facba42 in GOMP_parallel (fn=0x7fe51fdfb830 <soxr_process._omp_fn.0>, data=0x7ffe399341b0, num_threads=12, flags=0) at ../../../src/libgomp/parallel.c:171
#5  0x00007fe51fdfcf78 in soxr_process (p=0x55d6dda7a420, in=0x55d6dda4d2a0, ilen0=<optimized out>, idone0=0x0, out=0x55d6dda4d280, olen=6923, odone0=0x7ffe39934258) at ./src/soxr.c:781
#6  0x000055d6dc52dfd8 in main (n=0, arg=0x7ffe399344d8) at 4-split-channels.c:142

(gdb) display/i $pc
1: x/i $pc
=> 0x7fe51fe0010a <_soxr_interleave_f+4074>:    fistps (%r14)

(gdb) print/x $r14
$1 = 0x2b0






###############



root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# dd if=/dev/urandom count=1000 | valgrind --track-origins=yes /tmp/tmp.C4CscDL4N1/4-split-channels   7 6 2 2 3
==2708== Memcheck, a memory error detector
==2708== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2708== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==2708== Command: /tmp/tmp.C4CscDL4N1/4-split-channels 7 6 2 2 3
==2708== 
==2708== Thread 2:
==2708== Use of uninitialised value of size 8
==2708==    at 0x485210A: lsx_rint16_clip_dither_f (rint-clip.h:67)
==2708==    by 0x485210A: _soxr_interleave_f (data-io.c:213)
==2708==    by 0x484D60E: soxr_output_1ch (soxr.c:664)
==2708==    by 0x484D8CB: soxr_process._omp_fn.0 (soxr.c:786)
==2708==    by 0x4BD3945: gomp_thread_start (team.c:123)
==2708==    by 0x4C00FB6: start_thread (pthread_create.c:486)
==2708==    by 0x49AE2DE: clone (clone.S:95)
==2708==  Uninitialised value was created by a heap allocation
==2708==    at 0x483577F: malloc (vg_replace_malloc.c:309)
==2708==    by 0x109D37: main (4-split-channels.c:102)
==2708== 
==2708== Invalid write of size 2
==2708==    at 0x485210A: lsx_rint16_clip_dither_f (rint-clip.h:67)
==2708==    by 0x485210A: _soxr_interleave_f (data-io.c:213)
==2708==    by 0x484D60E: soxr_output_1ch (soxr.c:664)
==2708==    by 0x484D8CB: soxr_process._omp_fn.0 (soxr.c:786)
==2708==    by 0x4BD3945: gomp_thread_start (team.c:123)
==2708==    by 0x4C00FB6: start_thread (pthread_create.c:486)
==2708==    by 0x49AE2DE: clone (clone.S:95)
==2708==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==2708== 
==2708== 
==2708== Process terminating with default action of signal 11 (SIGSEGV)
==2708==  Access not within mapped region at address 0x0
==2708==    at 0x485210A: lsx_rint16_clip_dither_f (rint-clip.h:67)
==2708==    by 0x485210A: _soxr_interleave_f (data-io.c:213)
==2708==    by 0x484D60E: soxr_output_1ch (soxr.c:664)
==2708==    by 0x484D8CB: soxr_process._omp_fn.0 (soxr.c:786)
==2708==    by 0x4BD3945: gomp_thread_start (team.c:123)
==2708==    by 0x4C00FB6: start_thread (pthread_create.c:486)
==2708==    by 0x49AE2DE: clone (clone.S:95)
==2708==  If you believe this happened as a result of a stack
==2708==  overflow in your program's main thread (unlikely but
==2708==  possible), you can try to increase the size of the
==2708==  main thread stack using the --main-stacksize= flag.
==2708==  The main thread stack size used in this run was 8388608.
==2708== 
==2708== HEAP SUMMARY:
==2708==     in use at exit: 427,956 bytes in 37 blocks
==2708==   total heap usage: 48 allocs, 11 frees, 583,812 bytes allocated
==2708== 
==2708== LEAK SUMMARY:
==2708==    definitely lost: 0 bytes in 0 blocks
==2708==    indirectly lost: 0 bytes in 0 blocks
==2708==      possibly lost: 70,816 bytes in 11 blocks
==2708==    still reachable: 357,140 bytes in 26 blocks
==2708==         suppressed: 0 bytes in 0 blocks
==2708== Rerun with --leak-check=full to see details of leaked memory
==2708== 
==2708== For lists of detected and suppressed errors, rerun with: -s
==2708== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 0 from 0)
Speicherzugriffsfehler (Speicherabzug geschrieben)




#############




root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# echo 1 > /proc/sys/kernel/perf_event_paranoid

root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# dd if=/dev/urandom count=1000 | rr /tmp/tmp.C4CscDL4N1/4-split-channels   7 6 2 2 3
rr: Saving execution to trace directory `/root/.local/share/rr/4-split-channels-0'.
Speicherzugriffsfehler


root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# rr replay /root/.local/share/rr/4-split-channels-0/                                      
GNU gdb (Debian 8.3.1-1) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /root/.local/share/rr/4-split-channels-0/mmap_copy_4_4-split-channels...
Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal]
Remote debugging using 127.0.0.1:2641
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/debug/.build-id/62/00731a507d4c8781913b49bbf2243c92862cdd.debug...
0x00007f6925c81090 in _start () from /lib64/ld-linux-x86-64.so.2
(rr) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00007f6925be810a in lsx_rint16_clip_dither_f (seed0=0x55cc492f2540, n=6735, src=0x55cc49300870, dest0=0x55cc492c52c0) at ./src/rint-clip.h:67
67          DO_16;
(rr) display/i $pc
1: x/i $pc
=> 0x7f6925be810a <_soxr_interleave_f+4074>:    fistps (%r14)
(rr) print/x $r14
$1 = 0x0
(rr) reverse-stepi

Program received signal SIGSEGV, Segmentation fault.
0x00007f6925be810a in lsx_rint16_clip_dither_f (seed0=0x55cc492f2540, n=6735, src=0x55cc49300870, dest0=0x55cc492c52c0) at ./src/rint-clip.h:67
67          DO_16;
1: x/i $pc
=> 0x7f6925be810a <_soxr_interleave_f+4074>:    fistps (%r14)
2: /x $r14 = 0x0
(rr) 
0x00007f6925be8106      67          DO_16;
1: x/i $pc
=> 0x7f6925be8106 <_soxr_interleave_f+4070>:    fldl   0x8(%rsp)
2: /x $r14 = 0x0
(rr) 
0x00007f6925be8100      67          DO_16;
1: x/i $pc
=> 0x7f6925be8100 <_soxr_interleave_f+4064>:    movsd  %xmm0,0x8(%rsp)
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80fc      67          DO_16;
1: x/i $pc
=> 0x7f6925be80fc <_soxr_interleave_f+4060>:    addsd  %xmm2,%xmm0
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80f8      67          DO_16;
1: x/i $pc
=> 0x7f6925be80f8 <_soxr_interleave_f+4056>:    mulsd  %xmm1,%xmm0
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80f4      67          DO_16;
1: x/i $pc
=> 0x7f6925be80f4 <_soxr_interleave_f+4052>:    cvtsi2sd %edi,%xmm0
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80f1      67          DO_16;
1: x/i $pc
=> 0x7f6925be80f1 <_soxr_interleave_f+4049>:    sub    %r8d,%edi
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80ed      67          DO_16;
1: x/i $pc
=> 0x7f6925be80ed <_soxr_interleave_f+4045>:    and    $0x1f,%r8d
2: /x $r14 = 0x0
(rr) 
67          DO_16;
1: x/i $pc
=> 0x7f6925be80e9 <_soxr_interleave_f+4041>:    shr    $0x6,%r8
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80e1      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80e1 <_soxr_interleave_f+4033>:    mov    %rdx,0xd0(%rsp)
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80de      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80de <_soxr_interleave_f+4030>:    mov    %rdx,%r8
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80d7      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80d7 <_soxr_interleave_f+4023>:    add    $0x3c6ef35f,%rdx
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80d4      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80d4 <_soxr_interleave_f+4020>:    and    $0x1f,%edi
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80d0      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80d0 <_soxr_interleave_f+4016>:    shr    $0x6,%rdi
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80cd      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80cd <_soxr_interleave_f+4013>:    mov    %rax,%rdi
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80c6      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80c6 <_soxr_interleave_f+4006>:    imul   $0x19660d,%rax,%rdx
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80c0      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80c0 <_soxr_interleave_f+4000>:    add    $0x3c6ef35f,%rax
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80bb      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80bb <_soxr_interleave_f+3995>:    cvtss2sd 0x0(%rbp),%xmm2
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80b4      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80b4 <_soxr_interleave_f+3988>:    imul   $0x19660d,%rax,%rax
2: /x $r14 = 0x0
(rr) 
0x00007f6925be80b0      66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80b0 <_soxr_interleave_f+3984>:    pxor   %xmm2,%xmm2
2: /x $r14 = 0x0
(rr) 
66          DITHER_VARS;
1: x/i $pc
=> 0x7f6925be80ac <_soxr_interleave_f+3980>:    pxor   %xmm0,%xmm0
2: /x $r14 = 0x0
(rr) 
65          COPY_SEED1;
1: x/i $pc
=> 0x7f6925be80a4 <_soxr_interleave_f+3972>:    mov    %rax,0xd8(%rsp)
2: /x $r14 = 0x0
(rr) 
0x00007f6925be8080      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8080 <_soxr_interleave_f+3936>:    jmp    0x7f6925be80a4 <_soxr_interleave_f+3972>
2: /x $r14 = 0x0
(rr) 
0x00007f6925be807d      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be807d <_soxr_interleave_f+3933>:    mov    %rsi,%r14
2: /x $r14 = 0x1a40
(rr) undisp 2
(rr) display/x $rsi
3: /x $rsi = 0x0
(rr) reverse-stepi
0x00007f6925be807a      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be807a <_soxr_interleave_f+3930>:    mov    %r14,%r15
3: /x $rsi = 0x0
(rr) 
0x00007f6925be8077      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8077 <_soxr_interleave_f+3927>:    mov    %r15,%rbx
3: /x $rsi = 0x0
(rr) 
0x00007f6925be8074      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8074 <_soxr_interleave_f+3924>:    mov    %rbx,%rsi
3: /x $rsi = 0x7ffc9aa358f8
(rr) undisp 3
(rr) display/x $rbx
4: /x $rbx = 0x0
(rr) reverse-stepi
0x00007f6925be806c      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be806c <_soxr_interleave_f+3916>:    lea    0xd8(%rsp),%r12
4: /x $rbx = 0x0
(rr) 
0x00007f6925be8064      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8064 <_soxr_interleave_f+3908>:    movsd  0x23284(%rip),%xmm1        # 0x7f6925c0b2f0
4: /x $rbx = 0x0
(rr) 
0x00007f6925be805f      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be805f <_soxr_interleave_f+3903>:    mov    %rsi,0x50(%rsp)
4: /x $rbx = 0x0
(rr) 
0x00007f6925be8057      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8057 <_soxr_interleave_f+3895>:    lea    0xc8(%rsp),%rsi
4: /x $rbx = 0x0
(rr) 
0x00007f6925be8055      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8055 <_soxr_interleave_f+3893>:    xor    %ecx,%ecx
4: /x $rbx = 0x0
(rr) 
0x00007f6925be8052      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be8052 <_soxr_interleave_f+3890>:    mov    %r15,%rbp
4: /x $rbx = 0x0
(rr) 
0x00007f6925be804d      64        for (i = 0; i < (n & ~15u);) {
1: x/i $pc
=> 0x7f6925be804d <_soxr_interleave_f+3885>:    mov    0x20(%rsp),%rbx
4: /x $rbx = 0x55cc492f2420
(rr) when
Current event: 245
(rr) print/x $rsp
$2 = 0x7ffc9aa35830
(rr) print/x *(0x7ffc9aa35830+0x20)
$3 = 0x0
(rr) watch *(0x7ffc9aa35830+0x20)  
Hardware watchpoint 1: *(0x7ffc9aa35830+0x20)
(rr) undisp 4
(rr) reverse-cont
Continuing.

Hardware watchpoint 1: *(0x7ffc9aa35830+0x20)

Old value = 0
New value = 1227917456
0x00007f6925be715e in _soxr_interleave_f (data_type=<optimized out>, dest0=0x55cc492c52c0, src=0x7ffc9aa35990, n=6735, ch=1, seed=0x55cc492f2540) at ./src/data-io.c:203
203       switch (data_type & 3) {
1: x/i $pc
=> 0x7f6925be715e <_soxr_interleave_f+62>:      mov    %rax,0x20(%rsp)
(rr) bt
#0  0x00007f6925be715e in _soxr_interleave_f (data_type=<optimized out>, dest0=0x55cc492c52c0, src=0x7ffc9aa35990, n=6735, ch=1, seed=0x55cc492f2540) at ./src/data-io.c:203
#1  0x00007f6925be360f in soxr_output_1ch (p=p@entry=0x55cc492f2420, i=0, dest=dest@entry=0x55cc492c5280, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
#2  0x00007f6925be38cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
#3  0x00007f692588ba42 in GOMP_parallel (fn=0x7f6925be3830 <soxr_process._omp_fn.0>, data=0x7ffc9aa35a60, num_threads=1, flags=0) at ../../../src/libgomp/parallel.c:171
#4  0x00007f6925be4f78 in soxr_process (p=0x55cc492f2420, in=0x55cc492c52a0, ilen0=<optimized out>, idone0=0x0, out=0x55cc492c5280, olen=6923, odone0=0x7ffc9aa35b08) at ./src/soxr.c:781
#5  0x000055cc4893cfd8 in main (n=0, arg=0x7ffc9aa35d88) at 4-split-channels.c:142
(rr) dele 1
(rr) when
Current event: 245
(rr) display/x $rax
5: /x $rax = 0x0
(rr) reverse-stepi
203       switch (data_type & 3) {
1: x/i $pc
=> 0x7f6925be715b <_soxr_interleave_f+59>:      mov    (%rsi),%rax
5: /x $rax = 0x0
(rr) print/x $rsi
$4 = 0x55cc492c52c0
(rr) undisp 5
(rr) print/x *(0x55cc492c52c0)
$5 = 0x0
(rr) watch *(0x55cc492c52c0)
Hardware watchpoint 2: *(0x55cc492c52c0)
(rr) reverse-cont
Continuing.

Hardware watchpoint 2: *(0x55cc492c52c0)

Old value = 0
New value = <unreadable>
0x00007f6925b104a5 in __brk (addr=addr@entry=0x55cc492e6000) at ../sysdeps/unix/sysv/linux/x86_64/brk.c:31
31      ../sysdeps/unix/sysv/linux/x86_64/brk.c: Datei oder Verzeichnis nicht gefunden.
1: x/i $pc
=> 0x7f6925b104a5 <__brk+5>:    syscall 
(rr) bt
#0  0x00007f6925b104a5 in __brk (addr=addr@entry=0x55cc492e6000) at ../sysdeps/unix/sysv/linux/x86_64/brk.c:31
#1  0x00007f6925b10589 in __GI___sbrk (increment=135168) at sbrk.c:56
#2  __GI___sbrk (increment=135168) at sbrk.c:31
#3  0x00007f6925aa7329 in __GI___default_morecore (increment=<optimized out>) at morecore.c:47
#4  0x00007f6925aa3753 in sysmalloc (nb=nb@entry=592, av=av@entry=0x7f6925bd8c40 <main_arena>) at malloc.c:2480
#5  0x00007f6925aa48db in _int_malloc (av=av@entry=0x7f6925bd8c40 <main_arena>, bytes=bytes@entry=576) at malloc.c:4155
#6  0x00007f6925aa4b28 in tcache_init () at malloc.c:2997
#7  0x00007f6925aa58f6 in tcache_init () at malloc.c:3052
#8  __GI___libc_malloc (bytes=8) at malloc.c:3052
#9  0x00007f6925886189 in gomp_malloc (size=8) at ../../../src/libgomp/alloc.c:38
#10 0x00007f6925896c97 in gomp_init_num_threads () at ../../../src/libgomp/config/linux/proc.c:91
#11 0x00007f6925884665 in initialize_env () at ../../../src/libgomp/env.c:1324
#12 0x00007f6925c8f5ba in call_init (l=<optimized out>, argc=argc@entry=6, argv=argv@entry=0x7ffc9aa35d58, env=env@entry=0x7ffc9aa35d90) at dl-init.c:72
#13 0x00007f6925c8f6b9 in call_init (env=0x7ffc9aa35d90, argv=0x7ffc9aa35d58, argc=6, l=<optimized out>) at dl-init.c:30
#14 _dl_init (main_map=0x7f6925ca9190, argc=6, argv=0x7ffc9aa35d58, env=0x7ffc9aa35d90) at dl-init.c:119
#15 0x00007f6925c810ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#16 0x0000000000000006 in ?? ()
#17 0x00007ffc9aa36d4c in ?? ()
#18 0x00007ffc9aa36d71 in ?? ()
#19 0x00007ffc9aa36d73 in ?? ()
#20 0x00007ffc9aa36d75 in ?? ()
#21 0x00007ffc9aa36d77 in ?? ()
#22 0x00007ffc9aa36d79 in ?? ()
#23 0x0000000000000000 in ?? ()
(rr) when
Current event: 218
(rr) q




root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# rr replay /root/.local/share/rr/4-split-channels-0/
GNU gdb (Debian 8.3.1-1) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /root/.local/share/rr/4-split-channels-0/mmap_copy_4_4-split-channels...
Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal]
Remote debugging using 127.0.0.1:2727
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/debug/.build-id/62/00731a507d4c8781913b49bbf2243c92862cdd.debug...
0x00007f6925c81090 in _start () from /lib64/ld-linux-x86-64.so.2
(rr) b 4-split-channels.c:102
Breakpoint 1 at 0x55cc4893cd21: file 4-split-channels.c, line 102.
(rr) cont
Continuing.

Breakpoint 1, main (n=0, arg=0x7ffc9aa35d88) at 4-split-channels.c:102
102       char * const obufs = malloc(osize * olen), * optr = obufs;
(rr) print osize
$1 = 4
(rr) print olen
$2 = 6923
(rr) next
103       char * const ibufs = malloc(isize * ilen), * iptr = ibufs;
(rr) print obufs
$3 = 0x55cc492c52c0 ""
(rr) print obufs + (4*6923)
$4 = 0x55cc492cbeec ""
(rr) list
98
99        /* For split channels: */
100       void * * const obuf_ptrs = malloc(sizeof(void *) * chans);
101       void * *       ibuf_ptrs = malloc(sizeof(void *) * chans);
102       char * const obufs = malloc(osize * olen), * optr = obufs;
103       char * const ibufs = malloc(isize * ilen), * iptr = ibufs;
104
105       /* For interleaved channels: */
106       char * const obuf = malloc(osize * olen);
107       char * const ibuf = malloc(isize * ilen);
(rr) print orate
$5 = 6
(rr) print buf_total_len
No symbol "buf_total_len" in current context.
(rr) print irate
$6 = 7
(rr) print orate
$7 = 6
(rr) print orate * 15000
$8 = 90000
(rr) print irate + orate
$9 = 13
(rr) print (orate * buf_total_len / (irate + orate) + .5)
No symbol "buf_total_len" in current context.
(rr) print (orate * 15000 / (irate + orate) + .5)             
$10 = 6923.5769230769229
(rr) print olen
$11 = 6923
(rr) print (orate * 15000 / (irate + orate))     
$12 = 6923.0769230769229
(rr) print ilen
$13 = 8077
(rr) print optr
$14 = 0x55cc492c52c0 ""
(rr) print chans
$15 = 2
(rr) next
106       char * const obuf = malloc(osize * olen);
(rr) 
107       char * const ibuf = malloc(isize * ilen);
(rr) 
109       size_t odone, written, need_input = 1, clips = 0;
(rr) 
115       if (passband_end   > 0) q_spec.passband_end   = passband_end / 100;
(rr) 
116       if (stopband_begin > 0) q_spec.stopband_begin = stopband_begin / 100;
(rr) 
117       if (phase_response >=0) q_spec.phase_response = phase_response;
(rr) 
118       io_spec.flags = ospec & ~7u;
(rr) 
120       soxr = soxr_create(
(rr) 
123       for (i = 0; i < chans; ++i) {
(rr) 
124         ibuf_ptrs[i] = iptr;
(rr) 
125         obuf_ptrs[i] = optr;
(rr) next
126         iptr += ilen * soxr_datatype_size(itype);
(rr) b
Breakpoint 2 at 0x55cc4893cebc: file 4-split-channels.c, line 126.
(rr) dele 2
(rr) next
127         optr += olen * soxr_datatype_size(otype);
(rr) 
123       for (i = 0; i < chans; ++i) {
(rr) b
Breakpoint 3 at 0x55cc4893cf09: file 4-split-channels.c, line 123.
(rr) print optr
$16 = 0x55cc492c88d6 ""
(rr) print 0x55cc492c88d6 - 0x55cc492c52c0
$17 = 13846
(rr) print chans
$18 = 2
(rr) print/x 0x55cc492c52c0 + (2*13846)
$19 = 0x55cc492cbeec
(rr) next
124         ibuf_ptrs[i] = iptr;
(rr) 
125         obuf_ptrs[i] = optr;
(rr) 
126         iptr += ilen * soxr_datatype_size(itype);
(rr) 
127         optr += olen * soxr_datatype_size(otype);
(rr) 

Breakpoint 3, main (n=0, arg=0x7ffc9aa35d88) at 4-split-channels.c:123
123       for (i = 0; i < chans; ++i) {
(rr) 
130       if (!error) {
(rr) q



#############




        root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# dd if=/dev/urandom count=1000 | valgrind --track-origins=yes --vgdb=yes --vgdb-error=0 /tmp/tmp.C4CscDL4N1/4-split-channels   7 6 2 2 3
        ==2833== Memcheck, a memory error detector
        ==2833== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
        ==2833== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
        ==2833== Command: /tmp/tmp.C4CscDL4N1/4-split-channels 7 6 2 2 3
        ==2833== 
        ==2833== (action at startup) vgdb me ... 
        ==2833== 
        ==2833== TO DEBUG THIS PROCESS USING GDB: start GDB like this
        ==2833==   /path/to/gdb /tmp/tmp.C4CscDL4N1/4-split-channels
        ==2833== and then give GDB the following command
        ==2833==   target remote | /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=2833
        ==2833== --pid is optional if only one valgrind process is running
        ==2833== 



root@debian:/tmp/autopkgtest.s6k7pm/build.Nia/src# gdb -q /tmp/tmp.C4CscDL4N1/4-split-channels
Reading symbols from /tmp/tmp.C4CscDL4N1/4-split-channels...
(gdb) target remote | /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=2833
Remote debugging using | /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=2833
sh: 1: /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb: not found
Remote communication error.  Target disconnected.: Die Verbindung wurde vom Kommunikationspartner zurückgesetzt.
(gdb) target remote | /bin/vgdb --pid=2833
Remote debugging using | /bin/vgdb --pid=2833
relaying data between gdb and process 2833
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/debug/.build-id/62/00731a507d4c8781913b49bbf2243c92862cdd.debug...
0x0000000004001090 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) cont
Continuing.
[New Thread 2841]
[New Thread 2842]
[New Thread 2843]


        ==2833== Use of uninitialised value of size 8
        ==2833==    at 0x485210A: lsx_rint16_clip_dither_f (rint-clip.h:67)
        ==2833==    by 0x485210A: _soxr_interleave_f (data-io.c:213)
        ==2833==    by 0x484D60E: soxr_output_1ch (soxr.c:664)
        ==2833==    by 0x484D8CB: soxr_process._omp_fn.0 (soxr.c:786)
        ==2833==    by 0x4BCAA41: GOMP_parallel (parallel.c:171)
        ==2833==    by 0x484EF77: soxr_process (soxr.c:781)
        ==2833==    by 0x109FD7: main (4-split-channels.c:142)
        ==2833==  Uninitialised value was created by a heap allocation
        ==2833==    at 0x483577F: malloc (vg_replace_malloc.c:309)
        ==2833==    by 0x109D37: main (4-split-channels.c:102)
        ==2833== 
        ==2833== (action on error) vgdb me ... 


Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x000000000485210a in lsx_rint16_clip_dither_f (seed0=0x4c51500, n=6735, src=0x4ca4270, dest0=0x4c241a0) at ./src/rint-clip.h:67
67          DO_16;
(gdb) bt
#0  0x000000000485210a in lsx_rint16_clip_dither_f (seed0=0x4c51500, n=6735, src=0x4ca4270, dest0=0x4c241a0) at ./src/rint-clip.h:67
#1  _soxr_interleave_f (data_type=<optimized out>, dest0=0x4c241a0, src=<optimized out>, n=6735, ch=1, seed=0x4c51500) at ./src/data-io.c:213
#2  0x000000000484d60f in soxr_output_1ch (p=p@entry=0x4c513e0, i=0, dest=dest@entry=0x4c24100, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
#3  0x000000000484d8cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
#4  0x0000000004bcaa42 in GOMP_parallel (fn=0x484d830 <soxr_process._omp_fn.0>, data=0x1fff000800, num_threads=4, flags=0) at ../../../src/libgomp/parallel.c:171
#5  0x000000000484ef78 in soxr_process (p=0x4c513e0, in=0x4c24150, ilen0=<optimized out>, idone0=0x0, out=0x4c24100, olen=6923, odone0=0x1fff0008a8) at ./src/soxr.c:781
#6  0x0000000000109fd8 in main (n=0, arg=0x1fff000b28) at 4-split-channels.c:142
(gdb) list 
62      #if defined FE_INVALID && defined FPU_RINT
63      #define _ RINT(dest[i], src[i] DITHERING); ++i
64        for (i = 0; i < (n & ~15u);) {
65          COPY_SEED1;
66          DITHER_VARS;
67          DO_16;
68          if (fe_test_invalid()) {
69            fe_clear_invalid();
70            RINT_CLIP(dest, src, 1, i - 16, i, &clips PASS_SEED1);
71          }
(gdb) display/i $pc
1: x/i $pc
=> 0x485210a <_soxr_interleave_f+4074>: fistps (%r14)
(gdb) print/x $r14
$1 = 0x0
(gdb) print i
$2 = 0
(gdb) print dest
$3 = <optimized out>
(gdb) print src
$4 = (const float * const) 0x4ca4270
(gdb) print dest0
$5 = (void ** const) 0x4c241a0
(gdb) print *dest0
$6 = (void *) 0x0

(gdb) up
#1  _soxr_interleave_f (data_type=<optimized out>, dest0=0x4c241a0, src=<optimized out>, n=6735, ch=1, seed=0x4c51500) at ./src/data-io.c:213
213             return lsx_rint16_clip_dither_f(dest0, src[0], n, seed);
(gdb) print dest0
$7 = (void **) 0x4c241a0
(gdb) print *dest0
$8 = (void *) 0x0
(gdb) up
#2  0x000000000484d60f in soxr_output_1ch (p=p@entry=0x4c513e0, i=0, dest=dest@entry=0x4c24100, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
warning: Source file is more recent than executable.
664         p->clips += (p->interleave)(p->io_spec.otype, dest[i], &src,
(gdb) print i
$9 = 0
(gdb) print dest
$10 = (soxr_bufs_t) 0x4c24100
(gdb) print p->interleave
$11 = (interleave_t) 0x4851120 <_soxr_interleave_f>
(gdb) print dest[0]
$12 = (const soxr_buf_t) 0x4c241a0
(gdb) up
#3  0x000000000484d8cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
786           done = soxr_output_1ch(p, (unsigned)i, (soxr_bufs_t)out, olen, true);
(gdb) print out
$13 = <optimized out>
(gdb) up
#4  0x0000000004bcaa42 in GOMP_parallel (fn=0x484d830 <soxr_process._omp_fn.0>, data=0x1fff000800, num_threads=4, flags=0) at ../../../src/libgomp/parallel.c:171
171     ../../../src/libgomp/parallel.c: Datei oder Verzeichnis nicht gefunden.
(gdb) up
#5  0x000000000484ef78 in soxr_process (p=0x4c513e0, in=0x4c24150, ilen0=<optimized out>, idone0=0x0, out=0x4c24100, olen=6923, odone0=0x1fff0008a8) at ./src/soxr.c:781
781     #pragma omp parallel for
(gdb) down
#4  0x0000000004bcaa42 in GOMP_parallel (fn=0x484d830 <soxr_process._omp_fn.0>, data=0x1fff000800, num_threads=4, flags=0) at ../../../src/libgomp/parallel.c:171
171     ../../../src/libgomp/parallel.c: Datei oder Verzeichnis nicht gefunden.
(gdb) down
#3  0x000000000484d8cc in soxr_process._omp_fn.0 () at ./src/soxr.c:786
786           done = soxr_output_1ch(p, (unsigned)i, (soxr_bufs_t)out, olen, true);
(gdb) print i
$14 = 0
(gdb) print ((soxr_bufs_t)0x4c24100)[i]
$15 = (const soxr_buf_t) 0x4c241a0
(gdb) down
#2  0x000000000484d60f in soxr_output_1ch (p=p@entry=0x4c513e0, i=0, dest=dest@entry=0x4c24100, len=<optimized out>, len@entry=6923, separated=separated@entry=true) at ./src/soxr.c:664
664         p->clips += (p->interleave)(p->io_spec.otype, dest[i], &src,
(gdb) print &((soxr_bufs_t)0x4c24100)[i]
$16 = (const soxr_buf_t *) 0x4c24100








set width 0
set pagination off
display/i $pc
cont
print/x $r14

display/x $r14







mkdir /home/benutzer/source/libsoxr/orig -p
cd    /home/benutzer/source/libsoxr/orig
apt source libsoxr
cd

cd /home/benutzer/source/libsoxr
cp orig try1 -a
cd try1/libsoxr-0.1.3
dpkg-buildpackage



Reply to: