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

[perl #123879] Bleadperl between v5.21.7-259-g819b139 and v5.21.7-435-gdf3c16d broke RIBASUSHI/DBIx-Class-TimeStamp-0.14.tar.gz

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
February 25, 2015 06:07
Subject:
[perl #123879] Bleadperl between v5.21.7-259-g819b139 and v5.21.7-435-gdf3c16d broke RIBASUSHI/DBIx-Class-TimeStamp-0.14.tar.gz
Message ID:
rt-4.0.18-7324-1424844421-1712.123879-15-0@perl.org
On Mon Feb 23 16:54:54 2015, tonyc wrote:
> On Sun Feb 22 22:17:05 2015, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > >>>>> On Sun, 22 Feb 2015 20:00:00 -0800, "Tony Cook via RT" <perlbug-
> > >>>>> followup@perl.org> said:
> > 
> > tc> On Wed Feb 18 23:20:57 2015,
> > tc> andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > >> bisect
> > >> ------
> > >> It started to fail with v5.21.7-259-g819b139 but when that one was
> > >> reverted in v5.21.7-435-gdf3c16d it remained broken.
> > >>
> > >> The brokenness only occurs for perls compiled with -Duselongdouble.
> > 
> > tc> It was reverted in v5.21.7-436-g13c59d4 not v5.21.7-435-gdf3c16d.
> > 
> > Thanks for the corection.
> > 
> > tc> I can't reproduce the failure in v5.21.9-22-gf266b74 (blead) or in
> > tc> v5.21.7-436-g13c59d4.
> > 
> > Quite surprising for me.
> > 
> > tc> I built both with:
> > 
> > tc> ./Configure -Dprefix=/home/tony/perl/blead -Uversiononly -Dusedevel
> > tc> -des -Ui_db -Uuseithreads -Duselongdouble -DDEBUGGING=-g
> > 
> > Thanks for trying. I cannot explain. I still see the fail with
> > v5.21.9-24-gf4460c6.
> > 
> > Can you compare you system with
> > 
> > http://www.cpantesters.org/cpan/report/cf50d412-a699-11e4-9e0e-
> > 9e908971dd2f
> 
> A newer compiler did the trick.

The problem is occuring in S_outside_integer() which is reporting the bottom of the range in this code:

  # an attempt to detect former effects of RT#79576, bug itself present between
  # 0.08191 and 0.08209 inclusive (fixed in 0.08210 and higher)
  my $stringifiable = 0;

  for my $i (0.. $#$bindattrs) {

    $stringifiable++ if ( length ref $bind->[$i][1] and is_plain_value($bind->[$i][1]) );

(the 0) as being out of range because Perl_isinfnan() is returning true.

If I revert 415b66b2 which introduced this check the test passes.

If I use the nv value as a memory reference (eg. to dump the raw content of the NV) the tests pass.

Just dumping the content of the nv as a number makes no difference.

Here's the generated code with some comments:

0000000000000280 <S_outside_integer>:
     280:       48 83 ec 18             sub    $0x18,%rsp
; %rdi is the sv parameter, get sv_flags in %edx
; checking SvOK()
     284:       8b 57 0c                mov    0xc(%rdi),%edx
     287:       f6 c6 ff                test   $0xff,%dh
     28a:       75 24                   jne    2b0 <S_outside_integer+0x30>
; check type == SVt_REGEXP
     28c:       80 fa 08                cmp    $0x8,%dl
     28f:       74 1f                   je     2b0 <S_outside_integer+0x30>
; or that the flags match
     291:       89 d1                   mov    %edx,%ecx
; zero %eax to return false if needed
     293:       31 c0                   xor    %eax,%eax
     295:       81 e1 ff c0 00 01       and    $0x100c0ff,%ecx
     29b:       81 f9 0a 00 00 01       cmp    $0x100000a,%ecx
; jump to SvOK() true handling
     2a1:       74 0d                   je     2b0 <S_outside_integer+0x30>
; jump to false return
     2a3:       eb 05                   jmp    2aa <S_outside_integer+0x2a>
     2a5:       0f 1f 00                nopl   (%rax)
     2a8:       dd d8                   fstp   %st(0)
     2aa:       48 83 c4 18             add    $0x18,%rsp
     2ae:       c3                      retq   
     2af:       90                      nop
;     const NV nv = SvNV_nomg(sv); test SVf_NOK
     2b0:       80 e6 02                and    $0x2,%dh
; if not SVf_NOK go call sv_2nv_flags()
     2b3:       74 4b                   je     300 <S_outside_integer+0x80>
; it's NOK, load from SvNVX
     2b5:       48 8b 07                mov    (%rdi),%rax
     2b8:       db 68 30                fldt   0x30(%rax)
; call to sv_2nv_flags() end up here
     2bb:       48 83 ec 10             sub    $0x10,%rsp
     2bf:       d9 c0                   fld    %st(0)
     2c1:       db 3c 24                fstpt  (%rsp)
     2c4:       db 7c 24 10             fstpt  0x10(%rsp)
     2c8:       e8 00 00 00 00          callq  2cd <S_outside_integer+0x4d>
                        2c9: R_X86_64_PC32      Perl_isinfnan+0xfffffffffffffffc
     2cd:       84 c0                   test   %al,%al
     2cf:       5a                      pop    %rdx
     2d0:       59                      pop    %rcx
; if ne return true
     2d1:       75 d7                   jne    2aa <S_outside_integer+0x2a>
; start of other tests
     2d3:       d9 05 00 00 00 00       flds   0x0(%rip)        # 2d9 <S_outside_integer+0x59>
                        2d5: R_X86_64_PC32      .LC5+0xfffffffffffffffc
     2d9:       b8 01 00 00 00          mov    $0x1,%eax
     2de:       db 2c 24                fldt   (%rsp)
     2e1:       d9 c9                   fxch   %st(1)
     2e3:       df e9                   fucomip %st(1),%st
     2e5:       77 c1                   ja     2a8 <S_outside_integer+0x28>
     2e7:       db 2d 00 00 00 00       fldt   0x0(%rip)        # 2ed <S_outside_integer+0x6d>
                        2e9: R_X86_64_PC32      .LC6+0xfffffffffffffffc
     2ed:       d9 c9                   fxch   %st(1)
     2ef:       df e9                   fucomip %st(1),%st
     2f1:       dd d8                   fstp   %st(0)
     2f3:       0f 97 c0                seta   %al
     2f6:       48 83 c4 18             add    $0x18,%rsp
     2fa:       c3                      retq   

     2fb:       0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)
     300:       31 f6                   xor    %esi,%esi
     302:       e8 00 00 00 00          callq  307 <S_outside_integer+0x87>
                        303: R_X86_64_PC32      Perl_sv_2nv_flags+0xfffffffffffffffc
; nv is on the 
     307:       eb b2                   jmp    2bb <S_outside_integer+0x3b>
     309:       0f 1f 80 00 00 00 00    nopl   0x0(%rax)

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123879

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