Your message dated Mon, 21 Aug 2017 16:34:44 +0200
with message-id <[email protected]>
and subject line Re: Bug#646783: fftw3: configure --enable-debug-malloc doesn't 
enable debug_malloc
has caused the Debian Bug report #646783,
regarding fftw3: configure --enable-debug-malloc doesn't enable debug_malloc
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.)


-- 
646783: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646783
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fftw3
Severity: normal

While trying to track down a memory allocation problem with fftw3, I read the
documentation and
discovered the --enable-debug-malloc option.

So I did an
$ apt-get source fftw3
$ cd fftw3-3.2.2
$ ./configure CFLAGS=-g --prefix=$(readlink -f ..) --enable-debug-malloc
--enable-debug
$ make install

I even compiled the test program with -DFFTW_DEBUG -DFFTW_DEBUG_MALLOC
but no malloc debugging takes place.

I ended up linking with -lmcheck and sprinkling mcheck(0) to find the problem.

I realize this is probably an upstream bug but I'm reporting this to Debian as
I understand it's a
Debian preference.



-- System Information:
Debian Release: wheezy/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



--- End Message ---
--- Begin Message ---
Hi,

--enable-debug-alloc works for me.

steps to reproduce:

1. add the following flags to debian/rules before recompiling the package

archconfflags := $(archconfflags) --enable-debug --enable-debug-malloc

2. compile the attached test program, adjusting winsize to be large
enough to get malloc to fail.

$ gcc test.c -o a.out `pkg-config --libs --cflags fftw3f` && ./a.out
fftw: alloc.c:104: assertion failed: p
Aborted

$ gcc test.c -o a.out `pkg-config --libs --cflags fftw3f` && ./a.out
fftw: alloc.c:170: assertion failed: estat->siz >= 0
Aborted

These warnings are coming from './kernel/alloc.c', which is only
compiled in when --enable-debug-malloc is passed.

I'm not sure what else was expected ("no malloc debugging takes place"
is vague). Also, this option was since removed from the manual.

Please re-open as required, providing additional information.

cheers, piem
#define FFTW_DEBUG 1
#define FFTW_DEBUG_MALLOC 1
#include <stdlib.h>
#include <fftw3.h>

int main() {
  fftwf_plan pfw, pbw;
  int winsize = 1024 * 1024 * 513;
  int fft_size = winsize / 2 + 1;
  float *in = (float*)malloc(sizeof(float)*winsize);
  float *out = (float*)malloc(sizeof(float)*winsize);
  float *specdata = (float*)fftwf_malloc(sizeof(float)*fft_size);
  pfw = fftwf_plan_r2r_1d(winsize, in,  specdata, FFTW_R2HC, FFTW_ESTIMATE);
  pbw = fftwf_plan_r2r_1d(winsize, specdata, out, FFTW_HC2R, FFTW_ESTIMATE);
  fftwf_destroy_plan(pfw);
  fftwf_destroy_plan(pbw);
  fftwf_free(specdata);
  free(in);
  free(out);
  return 0;
}

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
-- 
debian-science-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to