develooper Front page | perl.perl5.porters | Postings from September 2006

Re: Change 28877: [PATCH] deal with some gcc warnings

Thread Next
From:
Nicholas Clark
Date:
September 24, 2006 14:30
Subject:
Re: Change 28877: [PATCH] deal with some gcc warnings
Message ID:
20060924213004.GA90713@plum.flirble.org
This change:

On Thu, Sep 21, 2006 at 01:00:08AM -0700, Rafael Garcia-Suarez wrote:
> Change 28877 by rgs@stencil on 2006/09/21 07:54:10
> 
> 	Subject: [PATCH] deal with some gcc warnings
> 	From: Jarkko Hietaniemi <jhi@iki.fi>
> 	Date: Thu, 21 Sep 2006 09:08:47 +0300
> 	Message-ID: <45122C6F.9080904@iki.fi>

specifically this 1 line (plus regen)

> ==== //depot/perl/reentr.pl#46 (text) ====
> Index: perl/reentr.pl
> --- perl/reentr.pl#45~28750~	2006-08-22 20:04:47.000000000 -0700
> +++ perl/reentr.pl	2006-09-21 00:54:10.000000000 -0700
> @@ -547,7 +547,7 @@
>  	    push @size, <<EOF;
>  #   if defined(HAS_SYSCONF) && defined($sc) && !defined(__GLIBC__)
>  	PL_reentrant_buffer->$sz = sysconf($sc);
> -	if (PL_reentrant_buffer->$sz == -1)
> +	if ((IV)PL_reentrant_buffer->$sz == (IV)-1)
>  		PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE;
>  #   else
>  #       if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
> 

causes these failures with -Duse64bitint on x86 FreeBSD:

Failed Test                               Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
../ext/File/Glob/t/basic.t                 255 65280    12    0  ??
../lib/Archive/Tar/t/01_use.t              255 65280     2    3  1-2
../lib/Archive/Tar/t/02_methods.t          255 65280    ??   ??  ??
../lib/Archive/Tar/t/03_file.t             255 65280    ??   ??  ??
../lib/Archive/Tar/t/04_resolved_issues.t  255 65280     1    1  1
../lib/Module/Build/t/ppm.t                255 65280    ??   ??  ??
../lib/Net/t/config.t                      255 65280    ??   ??  ??
../lib/Net/t/ftp.t                         255 65280    ??   ??  ??
../lib/Net/t/hostname.t                    255 65280    ??   ??  ??
../lib/Net/t/nntp.t                        255 65280    ??   ??  ??
../lib/Net/t/require.t                       9  2304     9    0  ??
../lib/Net/t/smtp.t                        255 65280    ??   ??  ??
../lib/Net/t/time.t                        255 65280    12    0  ??
../lib/User/grent.t                        255 65280     5    8  2-5
../lib/User/pwent.t                        255 65280    ??   ??  ??
../lib/h2xs.t                               12  3072   113   12  3-4 22-23 41-
                                                                 42 60-61 79-80
                                                                 94-95
../lib/warnings.t                                      564    2  297 299
op/grent.t                                   0   139     3    0  ??
op/groups.t                                255 65280     2    0  ??
op/pwent.t                                 255 65280    ??   ??  ??
op/taint.t                                   2   512   251    0  ??

For example:

$ ./perl t/op/grent.t 
1..3
# where local /etc/group
ok 1 - setgrent
# max = 25, n = 25, perfect = 24
ok 2
ok 3

$ ./perl t/op/groups.t 
# groups = nick
1..2
# pwgid = 1013, pwgnam = nick
# gr = 
ok 1
ok 2
panic: bad free during global destruction.

$ ./perl t/op/pwent.t  
panic: free from wrong pool, <PW> line 1.
panic: free from wrong pool during global destruction.

op/taint.t SEGVs here:

#0  0x081458a1 in Perl_dounwind (my_perl=0x828b000, cxix=-1) at pp_ctl.c:1417
1417        while (cxstack_ix > cxix) {
(gdb) where
#0  0x081458a1 in Perl_dounwind (my_perl=0x828b000, cxix=-1) at pp_ctl.c:1417
#1  0x080c36ba in S_my_exit_jump (my_perl=0x828b000) at perl.c:5298
#2  0x080c3369 in Perl_my_failure_exit (my_perl=0x828b000) at perl.c:5284
#3  0x08091d7e in Perl_vcroak (my_perl=0x828b000, 
    pat=0x82430ff "panic: bad free", args=0xbfbfe560) at util.c:1340
#4  0x08091db2 in Perl_croak_nocontext (pat=0x82430ff "panic: bad free")
    at util.c:1350
#5  0x0808df9e in Perl_safesysfree (where=0x8288600) at util.c:238
#6  0x08238932 in Perl_reentrant_free (my_perl=0x828b000) at reentr.c:260
#7  0x080b741e in perl_destruct (my_perl=0x828b000) at perl.c:1269
#8  0x08060206 in main (argc=2, argv=0xbfbfe694, env=0xbfbfe6a0)
    at perlmain.c:115


I don't know why all this happens.

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About