Package: valgrind
Version: 1:3.2.0-2
Severity: normal

Hi. 

I have just recompiled fftw3 using ---enable-altivec to enable the
altivec optimisation (see #225959). On a program that passed valgrind
with no single error before, I now get the following result:

~/aubio/examples/tests $ valgrind .libs/lt-test-mfft
==23363== Memcheck, a memory error detector.
==23363== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==23363== Using LibVEX rev 1606, a library for dynamic binary translation.
==23363== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==23363== Using valgrind-3.2.0-Debian, a dynamic binary instrumentation 
framework.
==23363== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==23363== For more details, rerun with: -v
==23363==
==23363== Invalid read of size 8
==23363==    at 0xFF06BF0: n1fv_64 (simd-altivec.h:79)
==23363==    by 0xFE5FD70: apply (direct.c:107)
==23363==    by 0xFE5D678: apply_dit (ct.c:41)
==23363==    by 0xFEA0AC8: apply_f_dft (rdft2-radix2.c:157)
==23363==    by 0xFEA022C: fftwf_rdft2_solve (solve2.c:30)
==23363==    by 0xFEF8FC4: fftwf_execute (execute.c:24)
==23363==    by 0xFF9F124: aubio_fft_do (fft.c:76)
==23363==    by 0xFF9F21C: aubio_mfft_do (fft.c:128)
==23363==    by 0x10001714: main (test-mfft.c:16)
==23363==  Address 0x44E28C0 is 8 bytes before a block of size 16,384 alloc'd
==23363==    at 0xFFBBA78: malloc (vg_replace_malloc.c:149)
==23363==    by 0xFF9F3C4: new_aubio_fft (fft.c:52)
==23363==    by 0xFF9F488: new_aubio_mfft (fft.c:116)
==23363==    by 0x10001704: main (test-mfft.c:12)
==23363==
==23363== Invalid read of size 4
==23363==    at 0xFF09ADC: n1fv_64 (simd-altivec.h:147)
==23363==    by 0xFE5FD70: apply (direct.c:107)
==23363==    by 0xFE5D678: apply_dit (ct.c:41)
==23363==    by 0xFEA0AC8: apply_f_dft (rdft2-radix2.c:157)
==23363==    by 0xFEA022C: fftwf_rdft2_solve (solve2.c:30)
==23363==    by 0xFEF8FC4: fftwf_execute (execute.c:24)
==23363==    by 0xFF9F124: aubio_fft_do (fft.c:76)
==23363==    by 0xFF9F21C: aubio_mfft_do (fft.c:128)
==23363==    by 0x10001714: main (test-mfft.c:16)
==23363==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==23363==
==23363== Process terminating with default action of signal 11 (SIGSEGV)
==23363==  Access not within mapped region at address 0x0
==23363==    at 0xFF09ADC: n1fv_64 (simd-altivec.h:147)
==23363==    by 0xFE5FD70: apply (direct.c:107)
==23363==    by 0xFE5D678: apply_dit (ct.c:41)
==23363==    by 0xFEA0AC8: apply_f_dft (rdft2-radix2.c:157)
==23363==    by 0xFEA022C: fftwf_rdft2_solve (solve2.c:30)
==23363==    by 0xFEF8FC4: fftwf_execute (execute.c:24)
==23363==    by 0xFF9F124: aubio_fft_do (fft.c:76)
==23363==    by 0xFF9F21C: aubio_mfft_do (fft.c:128)
==23363==    by 0x10001714: main (test-mfft.c:16)
==23363==
==23363== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 2)
==23363== malloc/free: in use at exit: 8,333,056 bytes in 1,144 blocks.
==23363== malloc/free: 2,566 allocs, 1,422 frees, 8,474,960 bytes allocated.
==23363== For counts of detected errors, rerun with: -v
==23363== searching for pointers to 1,144 not-freed blocks.
==23363== checked 5,409,404 bytes.
==23363==
==23363== LEAK SUMMARY:
==23363==    definitely lost: 0 bytes in 0 blocks.
==23363==      possibly lost: 0 bytes in 0 blocks.
==23363==    still reachable: 8,333,056 bytes in 1,144 blocks.
==23363==         suppressed: 0 bytes in 0 blocks.
==23363== Reachable blocks (those to which a pointer was found) are not shown.
==23363== To see them, rerun with: --show-reachable=yes
Segmentation fault

The corresponding lines in simd-altivec.h all contain a call to the
`vec_perm' function, which seem to be defined in gcc as:

$ grep vec_perm /usr/lib/gcc/powerpc-linux-gnu/4.1.2/include/altivec.h 
#define vec_vperm vec_perm
#define vec_perm __builtin_vec_perm

The test program is available as a baz archive here:
http://aubio.piem.org/bazaar/[EMAIL PROTECTED]

Cheers, Paul

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-1-powerpc
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages valgrind depends on:
ii  libc6                         2.3.6-16   GNU C Library: Shared libraries

Versions of packages valgrind recommends:
ii  gdb                        6.4.90.dfsg-1 The GNU Debugger

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to