Allan Dukat <vch...@dukat.dk> escreveu:

>Hello everyone on this list. 
>
>If I comment out the free-lines in in valias_select_names_end in vpalias.c, 
>like this: 
>
>void valias_select_names_end()
>{
> int i; 
>
>  /* if( NULL != names ) {
>    for(i=0;i<num_names;i++){
>      free(names[i]);
>    }
>    free(names);
>    names=NULL;
>  } */
>  max_names=0;
>  num_names=0;
>  cur_name=0;
>} 
>
>qmaildmin runs without any error. 
>
>Why is it needed to free the memory, is it not so that Apache will do a 
>proper clean up when the request ends anyway? 
>
>Unfortunately it is so that my C skills is not that good, that I myself can 
>rewrite valias_select_names_end. 
>
>However I doubt that the old code is the course to the error, but I can not 
>come up with anything better. 
>
>Thanks in advance for any help you are able to provide. 
>
>Best regards,
>Allan Dukat 
>
>Allan Dukat writes: 
>
>> Hi list  
>> 
>> I have a problem with qmailadmin-1.2.16, configured like this:  
>> 
>> ./configure \
>> --enable-vpopmaildir=/home/vpopmail \
>> --enable-htmldir=/usr/local/apache2/htdocs \
>> --enable-cgibindir=/usr/local/apache2/cgi-bin \
>> --enable-imageurl=/images/qmailadmin \
>> --enable-imagedir=/usr/local/apache2/htdocs/images/qmailadmin \
>> --enable-qmaildir=/var/qmail \
>> --enable-ezmlmdir=/usr/local/bin/ezmlm \
>> --enable-cgipath=/cgi-bin/qmailadmin \
>> --enable-autoresponder-path=/usr/local/bin \
>> --enable-vpopuser=vpopmail \
>> --enable-vpopgroup=vchkpw \
>> --disable-ezmlm-mysql \
>> --enable-modify-quota \
>> --enable-help  
>> 
>> When adding the fist Forward I got an empty page as answer, an this in
>> Apache errorlog:  
>> 
>> *** glibc detected *** /usr/local/apache2/cgi-bin/qmailadmin: double free 
>> or corruption (top): 0x0000000001f326e0 ***
>> ======= Backtrace: =========
>> /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f9ed7c8ab96]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x421f04]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x4219ad]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x42202f]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x40715d]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x4070a3]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x4054f5]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x4130c3]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x402db6]
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f9ed7c2d76d]
>> /usr/local/apache2/cgi-bin/qmailadmin[0x402929]  
>> 
>> During debug I have used
>> export CC="gcc -g -Xlinker -Map=../output.map"
>> to make a map-file, and I have "translated" the abowe to:  
>> 
>> /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f9ed7c8ab96]
>> /usr/local/apache2/cgi-bin/qmailadmin[valias_select_names_end]
>> /usr/local/apache2/cgi-bin/qmailadmin[valias_select_names]
>> /usr/local/apache2/cgi-bin/qmailadmin[valias_select_all]
>> /usr/local/apache2/cgi-bin/qmailadmin[count_forwards]
>> /usr/local/apache2/cgi-bin/qmailadmin[show_forwards]
>> /usr/local/apache2/cgi-bin/qmailadmin[adddotqmailnow]
>> /usr/local/apache2/cgi-bin/qmailadmin[process_comands]
>> /usr/local/apache2/cgi-bin/qmailadmin[main]  
>> 
>> The Forward is added, and I can add and list Forwards from now on. When 
>> all Forward is deleted and I add a new Forward the error is repeated with 
>> the same addresses. 
>> 
>> I Use Ubuntu 12.04.2 LTS, x86_64, fully patched.
>> And openssl-1.0.1e, netqmail-1.06, chkuser-2.0.9-release.patch,
>> qmail-authentication-081, ucspi-tcp-0.88, daemontools-0.76, pcre-8.32,
>> maildrop-2.6.0, vpopmail-5.4.33, ezmlm-idx-7.1.1, dovecot-2.2.1, 
>> apr-1.4.6,
>> apr-util-1.5.2, httpd-2.4.4, courier-authlib-0.65.0, sqwebmail-5.6.1,
>> autorespond-2.0.4, qmailadmin-1.2.16, qmailadmin-help-1.0.8 and
>> vqadmin-2.3.7 all configure-make-install.
>> Spam Filter is elsewhere.  
>> 
>> I have tried with qmailadmin-1.2.15 and qmailadmin-1.2.12 instead, but 
>> with the same result.  
>> 
>> The only problem I see is in the output from the make command of
>> vpopmail-5.4.33:  
>> 
>> 
>> gcc -I. -Icdb  -I.    -fPIC  -c -o libvpopmail_a-vpopmail.o `test -f 
>> 'vpopmail.c' || echo './'`vpopmail.c
>> vpopmail.c: In function ‘vadduser’:
>> vpopmail.c:741:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:741:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 5 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:741:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:741:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 5 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:743:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:743:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:746:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:746:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c: In function ‘format_maildirquota’:
>> vpopmail.c:3825:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:3827:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:3829:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:3829:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c: In function ‘qnprintf’:
>> vpopmail.c:4054:6: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmail.c:4054:6: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat  
>> 
>> gcc -I. -Icdb  -I.    -fPIC  -c -o libvpopmail_a-vlimits.o `test -f 
>> 'vlimits.c' || echo './'`vlimits.c
>> vlimits.c: In function ‘vlimits_write_limits_file’:
>> vlimits.c:483:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vlimits.c:484:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vlimits.c:485:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vlimits.c:486:9: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> gcc -I. -Icdb  -I.    -fPIC  -c -o libvpopmail_a-maildirquota.o `test -f 
>> 'maildirquota.c' || echo './'`maildirquota.c
>> maildirquota.c: In function ‘maildirsize_read’:
>> maildirquota.c:403:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int *’, but argument 3 has type ‘storage_t *’ 
>> [-Wformat]
>> maildirquota.c:403:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int *’, but argument 4 has type ‘storage_t *’ 
>> [-Wformat]
>> maildirquota.c: In function ‘doaddquota’:
>> maildirquota.c:809:2: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> maildirquota.c:809:2: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.    -fPIC  -c -o libvpopmail_a-vlistlib.o `test -f 
>> 'vlistlib.c' || echo './'`vlistlib.c
>> vlistlib.c: In function ‘ezmlm_decode’:
>> vlistlib.c:491:17: warning: format ‘%d’ expects argument of type 
>> ‘int’, but argument 3 has type ‘size_t’ [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.      -c maildirquota.c
>> maildirquota.c: In function ‘maildirsize_read’:
>> maildirquota.c:403:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int *’, but argument 3 has type ‘storage_t *’ 
>> [-Wformat]
>> maildirquota.c:403:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int *’, but argument 4 has type ‘storage_t *’ 
>> [-Wformat]
>> maildirquota.c: In function ‘doaddquota’:
>> maildirquota.c:809:2: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> maildirquota.c:809:2: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.      -c vmoddomlimits.c
>> vmoddomlimits.c: In function ‘main’:
>> vmoddomlimits.c:210:13: warning: format ‘%llu’ expects argument of 
>> type ‘long long unsigned int’, but argument 2 has type ‘storage_t’ 
>> [-Wformat]
>> vmoddomlimits.c:211:13: warning: format ‘%llu’ expects argument of 
>> type ‘long long unsigned int’, but argument 2 has type ‘storage_t’ 
>> [-Wformat]
>> vmoddomlimits.c:212:13: warning: format ‘%llu’ expects argument of 
>> type ‘long long unsigned int’, but argument 2 has type ‘storage_t’ 
>> [-Wformat]
>> vmoddomlimits.c:213:13: warning: format ‘%llu’ expects argument of 
>> type ‘long long unsigned int’, but argument 2 has type ‘storage_t’ 
>> [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.      -c vpopmaild.c
>> vpopmaild.c: In function ‘get_limits’:
>> vpopmaild.c:2284:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2284:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2286:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2286:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2288:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2288:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2290:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2290:5: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c: In function ‘get_user_size’:
>> vpopmaild.c:2628:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2628:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2630:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2630:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c: In function ‘get_domain_size’:
>> vpopmaild.c:2683:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2683:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2685:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2685:7: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2694:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2694:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2696:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]
>> vpopmaild.c:2696:3: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.      -c vlistlib.c
>> vlistlib.c: In function ‘ezmlm_decode’:
>> vlistlib.c:491:17: warning: format ‘%d’ expects argument of type 
>> ‘int’, but argument 3 has type ‘size_t’ [-Wformat]  
>> 
>> gcc -I. -Icdb  -I.      -c vusagec.c
>> vusagec.c: In function ‘main’:
>> vusagec.c:70:4: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 3 has type ‘storage_t’ 
>> [-Wformat]
>> vusagec.c:70:4: warning: format ‘%llu’ expects argument of type 
>> ‘long long unsigned int’, but argument 4 has type ‘storage_t’ 
>> [-Wformat]  
>> 
>> 
>> Is the above warnings normal behavior, or does this indicate that there is 
>> something seriously wrong in my environment?  
>> 
>> In that case I hope that someone have an idea of what it is.  
>> 
>> If the output of that make is fine, then I do not have any clue on, why I 
>> get the runtime error, and I hope somebody have seen it before an knows 
>> what to do.  
>> 
>> Thanks in advance for any help you are able to provide.  
>> 
>> Best regards,
>> Allan Dukat
>
>
>

!DSPAM:51ba1a7434131423417139!

Reply via email to