Package: speech-tools Version: 1:2.0.95~beta-1+youpi.1 Severity: important Tags: patch
Hello, audsp from festival systematically crashes so that I can't do anything with it. valgrind shows the following output: ==13225== Mismatched free() / delete / delete [] ==13225== at 0x4C23A8B: operator delete[](void*) (vg_replace_malloc.c:409) ==13225== by 0x52E58D1: EST_TSimpleMatrix<short>::resize(int, int, int) (EST_TSimpleMatrix.cc:166) ==13225== by 0x52925EB: EST_Wave::free_wave() (EST_Wave.cc:99) ==13225== by 0x5292615: EST_Wave::~EST_Wave() (EST_Wave.cc:105) ==13225== by 0x40336D: check_new_output() (audsp.cc:472) ==13225== by 0x403A8C: auspl_main(int, char**) (audsp.cc:225) ==13225== by 0x403EF8: main (audsp.cc:194) ==13225== Address 0x72c56f0 is 0 bytes inside a block of size 1 alloc'd ==13225== at 0x4C2380C: calloc (vg_replace_malloc.c:467) ==13225== by 0x5328515: safe_walloc (walloc.c:92) ==13225== by 0x5290BCE: load_wave_nist(EST_TokenStream&, short**, int*, int*, int*, int*, EST_sample_type_t*, int*, int, int) (EST_wave_io.cc:242) ==13225== by 0x528901A: EST_WaveFile::load_nist(EST_TokenStream&, EST_Wave&, int, EST_sample_type_t, int, int, int, int) (EST_WaveFile.cc:84) ==13225== by 0x52936EE: EST_Wave::load(EST_TokenStream&, int, int, int) (EST_Wave.cc:223) ==13225== by 0x529419F: EST_Wave::load(EST_String, int, int, int) (EST_Wave.cc:191) ==13225== by 0x4032F3: check_new_output() (audsp.cc:470) ==13225== by 0x403A8C: auspl_main(int, char**) (audsp.cc:225) ==13225== by 0x403EF8: main (audsp.cc:194) which is fixed by the attached patch, by copying from free-allocated buffer given by load_wave_nist to new-allocated buffer expected by TSimpleMatrix. Samuel -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.36 (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages speech-tools depends on: ii libaudiofile0 0.2.6-8 Open-source version of SGI's audio ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib ii libesd0 0.2.41-7 Enlightened Sound Daemon - Shared ii libestools2.0 1:2.0.95~beta-1 Edinburgh Speech Tools Library ii libgcc1 1:4.5.0-6 GCC support library ii libncurses5 5.7+20100313-4 shared libraries for terminal hand ii libstdc++6 4.5.0-6 The GNU Standard C++ Library v3 speech-tools recommends no packages. Versions of packages speech-tools suggests: pn speech-tools-doc <none> (no description available) -- no debconf information -- Samuel Thibault <samuel.thiba...@fnac.net> <L> pour moi le seul qui est autoris� � fasciser, c moi :-)
--- ./speech_class/EST_WaveFile.cc.original 2010-10-24 18:15:41.000000000 +0200 +++ ./speech_class/EST_WaveFile.cc 2010-10-24 18:18:48.000000000 +0200 @@ -85,7 +85,10 @@ if (status == read_ok) { - wv.values().set_memory(data, 0, nsamp, nchan, TRUE); + short *data2 = new short[nsamp*nchan]; + memcpy(data2, data, nsamp*nchan*sizeof(short)); + wfree(data); + wv.values().set_memory(data2, 0, nsamp, nchan, TRUE); wv.set_sample_rate(srate); }