When I try to use the -l option in HCompV, I obtain the following abort error (see below for the full HCompV log and backtrace): *** stack smashing detected ***: HCompV terminated ----- HCompV log ----- HCompV -A -D -V -T 10 -C /data1/voice-conversion-data/speech_em_sp-act_em= o_16000/Matteo//F1_MFCC_0-NUMCHANS_54-NUMCEPS_26/F2_MFCC_0-NOSIL/TYPE_GMM= _MODEL_ALL-COVKIND_DIAGC-MIXES_16/scripts//config_features_train -f 0.01 = -m -l nosil -I /data1/voice-conversion-data/speech_em_sp-act_emo_16000/Ma= tteo//F1_MFCC_0-NUMCHANS_54-NUMCEPS_26/F2_MFCC_0-NOSIL/TYPE_GMM_MODEL_ALL= -COVKIND_DIAGC-MIXES_16/scripts//synthesized_neutral/sil-nosil_classes.ml= f -S /data1/voice-conversion-data/speech_em_sp-act_emo_16000/Matteo//F1_M= FCC_0-NUMCHANS_54-NUMCEPS_26/F2_MFCC_0-NOSIL/TYPE_GMM_MODEL_ALL-COVKIND_D= IAGC-MIXES_16/scripts//synthesized_neutral/train.scp -M /data1/voice-conv= ersion-data/speech_em_sp-act_emo_16000/Matteo//F1_MFCC_0-NUMCHANS_54-NUMC= EPS_26/F2_MFCC_0-NOSIL/TYPE_GMM_MODEL_ALL-COVKIND_DIAGC-MIXES_16/models/s= ynthesized_neutral/gmm0 /data1/voice-conversion-data/speech_em_sp-act_emo= _16000/Matteo//F1_MFCC_0-NUMCHANS_54-NUMCEPS_26/F2_MFCC_0-NOSIL/TYPE_GMM_= MODEL_ALL-COVKIND_DIAGC-MIXES_16/models/synthesized_neutral/proto/proto=20 HTK Configuration Parameters[13] Module/Tool Parameter Value # HIFREQ 8000 # LOFREQ 0 # ENORMALISE FALSE # NUMCEPS 26 # CEPLIFTER 0 # NUMCHANS 54 # PREEMCOEF 0 # USEHAMMING TRUE # WINDOWSIZE 400000.000000 # SAVEWITHCRC TRUE # SAVECOMPRESSED TRUE # TARGETRATE 100000.000000 # TARGETKIND MFCC_0 HTK Version Information Module Version Who Date : CVS Info HCompV 3.4.1 CUED 12/03/09 : $Id: HCompV.c,v 1.1.1.1 2006/10/= 11 09:54:59 jal58 Exp $ HShell 3.4.1 CUED 12/03/09 : $Id: HShell.c,v 1.1.1.1 2006/10/= 11 09:54:58 jal58 Exp $ HMem 3.4.1 CUED 12/03/09 : $Id: HMem.c,v 1.1.1.1 2006/10/11= 09:54:58 jal58 Exp $ HLabel 3.4.1 CUED 12/03/09 : $Id: HLabel.c,v 1.1.1.1 2006/10/= 11 09:54:57 jal58 Exp $ HMath 3.4.1 CUED 12/03/09 : $Id: HMath.c,v 1.1.1.1 2006/10/1= 1 09:54:58 jal58 Exp $ HSigP 3.4.1 CUED 12/03/09 : $Id: HSigP.c,v 1.1.1.1 2006/10/1= 1 09:54:58 jal58 Exp $ HWave 3.4.1 CUED 12/03/09 : $Id: HWave.c,v 1.1.1.1 2006/10/1= 1 09:54:59 jal58 Exp $ HAudio 3.4.1 CUED 12/03/09 : $Id: HAudio.c,v 1.1.1.1 2006/10/= 11 09:54:57 jal58 Exp $ HVQ 3.4.1 CUED 12/03/09 : $Id: HVQ.c,v 1.1.1.1 2006/10/11 = 09:54:59 jal58 Exp $ HModel 3.4.1 CUED 12/03/09 : $Id: HModel.c,v 1.2 2006/12/07 1= 1:09:08 mjfg Exp $ HParm 3.4.1 CUED 12/03/09 : $Id: HParm.c,v 1.1.1.1 2006/10/1= 1 09:54:58 jal58 Exp $ loading seg nosil [20->109] *** stack smashing detected ***: HCompV terminated Backtrace: /lib32/libc.so.6(__fortify_fail+0x48)[0xf7ea44f8] /lib32/libc.so.6(__fortify_fail+0x0)[0xf7ea44b0] HCompV[0x804ad94] [0x464d5f32] =3D=3D=3D=3D=3D=3D=3D Memory map: 08048000-080bd000 r-xp 00000000 08:02 98690 = /usr/local/bin/HCompV 080bd000-080be000 r--p 00074000 08:02 98690 = /usr/local/bin/HCompV 080be000-080c0000 rw-p 00075000 08:02 98690 = /usr/local/bin/HCompV 080c0000-081c2000 rw-p 080c0000 00:00 0=20 09849000-0988c000 rw-p 09849000 00:00 0 = [heap] f7c70000-f7c7d000 r-xp 00000000 08:02 303200 = /usr/lib32/libgcc_s.so.1 f7c7d000-f7c7e000 r--p 0000c000 08:02 303200 = /usr/lib32/libgcc_s.so.1 f7c7e000-f7c7f000 rw-p 0000d000 08:02 303200 = /usr/lib32/libgcc_s.so.1 f7cad000-f7da4000 rw-p f7cad000 00:00 0=20 f7da4000-f7f00000 r-xp 00000000 08:02 483333 = /lib32/libc-2.9.so f7f00000-f7f01000 ---p 0015c000 08:02 483333 = /lib32/libc-2.9.so f7f01000-f7f03000 r--p 0015c000 08:02 483333 = /lib32/libc-2.9.so f7f03000-f7f04000 rw-p 0015e000 08:02 483333 = /lib32/libc-2.9.so f7f04000-f7f07000 rw-p f7f04000 00:00 0=20 f7f07000-f7f2b000 r-xp 00000000 08:02 483337 = /lib32/libm-2.9.so f7f2b000-f7f2c000 r--p 00023000 08:02 483337 = /lib32/libm-2.9.so f7f2c000-f7f2d000 rw-p 00024000 08:02 483337 = /lib32/libm-2.9.so f7f32000-f7f5d000 rw-p f7f32000 00:00 0=20 f7f5d000-f7f5e000 r-xp f7f5d000 00:00 0 = [vdso] f7f5e000-f7f7d000 r-xp 00000000 08:02 483330 = /lib32/ld-2.9.so f7f7d000-f7f7e000 r--p 0001e000 08:02 483330 = /lib32/ld-2.9.so f7f7e000-f7f7f000 rw-p 0001f000 08:02 483330 = /lib32/ld-2.9.so ffd69000-ffd7f000 rw-p 7ffffffe9000 00:00 0 = [stack] Aborted ----- end of HCompV log ----- ----- HCompV gdb backtrace ----- (gdb) bt #0 0xf7f7a430 in __kernel_vsyscall () #1 0xf7dec9a0 in *__GI_raise (sig=3D6) at ../nptl/sysdeps/unix/sysv/linu= x/raise.c:64 #2 0xf7dee368 in *__GI_abort () at abort.c:88 #3 0xf7e2ae4d in __libc_message (do_abort=3D2, fmt=3D0xf7f03988 "*** %s ***: %s terminated\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:170 #4 0xf7ec14f8 in *__GI___fortify_fail (msg=3D0xf7f03970 "stack smashing = detected") at fortify_fail.c:32 #5 0xf7ec14b0 in __stack_chk_fail () at stack_chk_fail.c:29 #6 0x0804ad94 in LoadFile ( fn=3D0x81bc7a0 "/data1/voice-conversion-data/speech_em_sp-act_emo_16000/Matteo/F1_MFCC_0= -NUMCHANS_54-NUMCEPS_26/F2_MFCC_0-NOSIL/features/synthesized_neutral/posi= tive/iem0395.mfc") at HCompV.c:483 #7 0x464d5f32 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) ----- end of HCompV gdb backtrace ----- I use htk 3.4.1 on ubuntu 9.04 with gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4). I have investigated a little the problem; the error comes from a protection features (-fstack-protector) that gcc enable by default in ubuntu. The following is taken from the gcc manual: ----- man gcc ----- -fstack-protector Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with vulnerable objects. This includes functions that call alloca, and functions with buffers larger than 8 bytes. The guards are initialized when a function is entered and then checked when the function exits. If a guard check fails, an error message is printed and the program exits. NOTE: In Ubuntu 6.10 and later versions this option is enabled by default for C, C++, ObjC, ObjC++, if neither -fno-stack-protector nor -nostdlib are found. ----- end of man gcc ----- Looking into the "void LoadFile(char *fn)" function on HCompV.c code, I see that there is a buffer used for the labfilenames with a dimension of 80: .. char labfn[80]; .. So as my opinion the problem could be the length of the lab file names (I work with long filenames), and infact after changing the previous line with (MAXFNAMELEN is 1034): .. char labfn[MAXFNAMELEN]; .. the error has not occurred more. The same error seem to be present also in HInit and HRest. file:///home/fabio/dev-synch/istc_workspace/htk-3.4.1/htk-patch/htk-3.4.1.long_labfile.patch I attach my patch if you want try it (patch -c -l -p2 -d ./htk < htk-3.4.1.long_labfile.patch). Best Regards Fabio Tesser --------------030405050301080903020809 Content-Type: text/x-patch; name="htk-3.4.1.long_labfile.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="htk-3.4.1.long_labfile.patch" diff -c -b -r -N ./htk/HTKTools/HCompV.c ./htk_patch/HTKTools/HCompV.c *** ./htk/HTKTools/HCompV.c 2009-03-12 19:51:37.000000000 +0100 --- ./htk_patch/HTKTools/HCompV.c 2009-07-24 14:41:31.000000000 +0200 *************** *** 427,433 **** { ParmBuf pbuf; BufferInfo info; ! char labfn[80]; Transcription *trans; long segStIdx,segEnIdx; int i,j,ncas,nObs; --- 427,433 ---- { ParmBuf pbuf; BufferInfo info; ! char labfn[MAXFNAMELEN]; Transcription *trans; long segStIdx,segEnIdx; int i,j,ncas,nObs; diff -c -b -r -N ./htk/HTKTools/HInit.c ./htk_patch/HTKTools/HInit.c *** ./htk/HTKTools/HInit.c 2009-03-12 19:52:22.000000000 +0100 --- ./htk_patch/HTKTools/HInit.c 2009-07-24 14:41:18.000000000 +0200 *************** *** 398,404 **** void LoadFile(char *fn) { BufferInfo info; ! char labfn[80]; Transcription *trans; long segStIdx,segEnIdx; static int segIdx=1; /* Between call handle on latest seg in segStore */ --- 398,404 ---- void LoadFile(char *fn) { BufferInfo info; ! char labfn[MAXFNAMELEN]; Transcription *trans; long segStIdx,segEnIdx; static int segIdx=1; /* Between call handle on latest seg in segStore */ diff -c -b -r -N ./htk/HTKTools/HRest.c ./htk_patch/HTKTools/HRest.c *** ./htk/HTKTools/HRest.c 2009-03-12 19:53:33.000000000 +0100 --- ./htk_patch/HTKTools/HRest.c 2009-07-24 14:41:48.000000000 +0200 *************** *** 458,464 **** void LoadFile(char *fn) { BufferInfo info; ! char labfn[80]; Transcription *trans; long segStIdx,segEnIdx; static int segIdx=1; /* Between call handle on latest seg in segStore */ --- 458,464 ---- void LoadFile(char *fn) { BufferInfo info; ! char labfn[MAXFNAMELEN]; Transcription *trans; long segStIdx,segEnIdx; static int segIdx=1; /* Between call handle on latest seg in segStore */ --------------030405050301080903020809--