Your message dated Tue, 29 Nov 2011 01:04:56 +0100
with message-id <[email protected]>
and subject line Not a bug
has caused the Debian Bug report #600205,
regarding libfftw3-3: memory leak in 1d transform
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
600205: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600205
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libfftw3-3
Version: 3.2.2-1
Severity: important
Tags: upstream

        Hi !

There seems to be a memory leak when doing a 1d 
transform. 

To reproduce, you can use the following code, adapted from
the manual [1]:
8<------------------------------------>8
#include <fftw3.h>
#include <stdlib.h>

#define N 100
#define SEED 123456789

  int main (int argc, char *argv[])
     {
         fftw_complex *in, *out;
         fftw_plan p;
         in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
         out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
         int i;
         for (i = 0; i < N; i++)
         {
            in[i][0] = rand();
            in[i][1] = rand();
            out[i][0] = rand();
            out[i][1] = rand();
         }
         p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
         fftw_execute(p); /* repeat as needed */
         fftw_destroy_plan(p);
         fftw_free(in); fftw_free(out);
         exit(0);
     }
8<------------------------------------>8

When run with
  valgrind --leak-check=full --show-reachable=yes ./test_fftw_memleakc
It shows tons of leaks of the form:
==11476== 40 bytes in 1 blocks are still reachable in loss record 38 of 73
==11476==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==11476==    by 0x4E3D871: fftw_malloc_plain (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4E416F8: fftw_mksolver (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4E49E2F: fftw_dft_vrank_geq1_register (in 
/usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4E41737: fftw_solvtab_exec (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4E44DA2: fftw_dft_conf_standard (in 
/usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F0BCB8: fftw_configure_planner (in 
/usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F10563: fftw_the_planner (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F0BAED: fftw_mkapiplan (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F101A5: fftw_plan_many_dft (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F0F678: fftw_plan_dft (in /usr/lib/libfftw3.so.3.2.4)
==11476==    by 0x4F0F425: fftw_plan_dft_1d (in /usr/lib/libfftw3.so.3.2.4)


Romain


[1]: 
http://www.fftw.org/fftw3_doc/Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF8, LC_CTYPE=fr_FR.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libfftw3-3 depends on:
ii  libc6                         2.11.2-6   Embedded GNU C Library: Shared lib

libfftw3-3 recommends no packages.

Versions of packages libfftw3-3 suggests:
pn  libfftw3-dev                  <none>     (no description available)

-- no debconf information
#include <fftw3.h>
#include <stdlib.h>

#define N 100
#define SEED 123456789

  int main (int argc, char *argv[])
     {
         fftw_complex *in, *out;
         fftw_plan p;
         in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
         out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
         int i;
         for (i = 0; i < N; i++)
         {
            in[i][0] = rand();
            in[i][1] = rand();
            out[i][0] = rand();
            out[i][1] = rand();
         }
         p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
         fftw_execute(p); /* repeat as needed */
         fftw_destroy_plan(p);
         fftw_free(in); fftw_free(out);
         exit(0);
     }

--- End Message ---
--- Begin Message ---
As said, using fftw_cleanup fixes the issue.

Sylvestre
(bonjour Romain)




--- End Message ---

Reply via email to