develooper Front page | perl.perl5.porters | Postings from February 2015

Re: new ubuntu breaks pack.t

Thread Previous | Thread Next
From:
Tony Cook
Date:
February 12, 2015 05:51
Subject:
Re: new ubuntu breaks pack.t
Message ID:
20150212055051.GS5531@mars.tony.develop-help.com
On Tue, Feb 10, 2015 at 06:00:57PM -0700, Karl Williamson wrote:
> In wondering why this wasn't showing up in smokes, it has dawned on
> me that the reason is most likely to be the fact that I upgraded to
> the latest Ubuntu, and the g++ there is 4.9.1.  Things don't fail
> under plain gcc, at least with the options I'm passing it.
> 
> The options I pass to g++ are
> config_args='-des -Uversiononly -Dprefix=/home/khw/blead -Dusedevel
> -D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0'
> -Accflags='-DPERL_BOOL_AS_CHAR' -Dman1dir=none -Dman3dir=none
> -DDEBUGGING -Dcc=g++ -Dusemorebits -Dusethreads'
> 
> And the pack.t output is:
> 
> # Failed test 4311 - at op/pack.t line 1127
> #      got "\000\000\000\000\000V@\x{8a}\x{b7}\x{ab}\x{c6}\'\005\003\005\x{ae}\x{80}\x{ff}\000\000\000\000\000V?s\x{b2}g\x{ed}\031@\x{f1}\x{c6}\034"
> # expected "\000\000\000\000\002\x{86}@\x{8a}\x{b7}\x{ab}\x{c6}\'\005\003\005\x{ae}\x{80}\x{ff}\000\000\000\000\002\x{86}?s\x{b2}g\x{ed}\031@\x{f1}\x{c6}\034"
> # Failed test 4316 - at op/pack.t line 1127
> #      got "\x{ae}\005\003\005\'\x{c6}\x{ab}\x{b7}\x{8a}@V\000\000\000\000\000\x{80}\x{ff}\034\x{c6}\x{f1}@\031\x{ed}g\x{b2}s?V\000\000\000\000\000"
> # expected "\x{ae}\005\003\005\'\x{c6}\x{ab}\x{b7}\x{8a}@\x{86}\002\000\000\000\000\x{80}\x{ff}\034\x{c6}\x{f1}@\031\x{ed}g\x{b2}s?\x{86}\002\000\000\000\000"
> # Failed test 4321 - at op/pack.t line 1127
> #      got "@I\017\x{d0}\000\000\000\000\000V@\005\x{de}8Q\x{eb}\x{85}\036\x{b8}R@\x{a1}\\p\x{a3}\x{d7}\n="
> # expected "@I\017\x{d0}\000\000\000\000\002\x{86}@\005\x{de}8Q\x{eb}\x{85}\036\x{b8}R@\x{a1}\\p\x{a3}\x{d7}\n="
> # Failed test 4326 - at op/pack.t line 1127
> #      got "\x{d0}\017I@R\x{b8}\036\x{85}\x{eb}Q8\x{de}\005@V\000\000\000\000\000=\n\x{d7}\x{a3}p\\\x{a1}@"
> # expected "\x{d0}\017I@R\x{b8}\036\x{85}\x{eb}Q8\x{de}\005@\x{86}\002\000\000\000\000=\n\x{d7}\x{a3}p\\\x{a1}@"
> op/pack.t ..........................................................

This looks like another "rubbish in the packing" issue.

I managed to reproduce this, I think the problem is this generated
code, where g++ is assigning the double into a temp, and then copying
12 bytes from the temp into aldouble.ld:

#  ifdef __GNUC__
                /* to work round a gcc/x86 bug; don't use SvNV */
                aldouble.ld = (long double)sv_2nv(fromstr);
    f0fc:       48 8b 8d 40 f1 ff ff    mov    -0xec0(%rbp),%rcx
    f103:       48 8b 85 98 ef ff ff    mov    -0x1068(%rbp),%rax
    f10a:       ba 02 00 00 00          mov    $0x2,%edx
    f10f:       48 89 ce                mov    %rcx,%rsi
    f112:       48 89 c7                mov    %rax,%rdi
    f115:       e8 00 00 00 00          callq  f11a <S_pack_rec+0x5499>
                        f116: R_X86_64_PC32     Perl_sv_2nv_flags-0x4
    f11a:       db bd 50 ef ff ff       fstpt  -0x10b0(%rbp)
    f120:       48 8b 85 50 ef ff ff    mov    -0x10b0(%rbp),%rax
    f127:       8b 95 58 ef ff ff       mov    -0x10a8(%rbp),%edx
    f12d:       48 89 85 20 f5 ff ff    mov    %rax,-0xae0(%rbp)
    f134:       89 95 28 f5 ff ff       mov    %edx,-0xad8(%rbp)

The same problem happens with g++ 5.0 to-be.

Tony

Thread Previous | 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