develooper Front page | perl.perl5.porters | Postings from December 2018

Re: 5.28.1 with -Duseshrplib issues

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
December 10, 2018 09:46
Subject:
Re: 5.28.1 with -Duseshrplib issues
Message ID:
20181210104540.79385da5@pc09.procura.nl
Interesting case. Important question at the end

On Wed, 5 Dec 2018 10:02:07 +0100, "H.Merijn Brand" <h.m.brand@xs4all.nl> wrote:

> Image-Scale-0.14-0 ========================================================
> 
> t/stringify.t ...... perl5.28.1: src/image.c:48: image_init: Assertion `PL_valid_types_PVX[SvTYPE(_svpvx) & SVt_MASK]' failed.
> t/stringify.t ...... Failed 3/3 subtests

This is Path::Tiny related

The path followed is ...

    my $im = Image::Scale->new( Path::Tiny::path( _f("jpg/rgb.jpg") ) );

which ends up here

  if (my_hv_exists(self, "file")) {
    // Input from file
    SV *path = *(my_hv_fetch(self, "file"));
    file = SvPVX(path);
    im->fh = IoIFP(sv_2io(*(my_hv_fetch(self, "_fh"))));
    im->path = newSVsv(path);
  }

an sv_dump of path shows

SV = IV(0x23c4bd0) at 0x23c4be0
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x2d475f0
    SV = PVAV(0x2cf2b40) at 0x2d475f0
      REFCNT = 3
      FLAGS = (OBJECT)
      STASH = 0x23e9b70 "Path::Tiny"
      ARRAY = 0x2d61b00
      FILL = 1
      MAX = 1
      FLAGS = (REAL)
        Elt No. 0
        SV = PV(0x23b23a0) at 0x2c98f88
          REFCNT = 1
          FLAGS = (POK,IsCOW,pPOK)
          PV = 0x2d8d140 "/data/home/merijn/.cpan/build/Image-Scale-0.14/t/images/jpg/rgb.jpg"\0
          CUR = 67
          LEN = 69
          COW_REFCNT = 1
        Elt No. 1
        SV = PV(0x2cc7800) at 0x2d475a8
          REFCNT = 1
          FLAGS = (POK,IsCOW,pPOK)
          PV = 0x2d8d140 "/data/home/merijn/.cpan/build/Image-Scale-0.14/t/images/jpg/rgb.jpg"\0
          CUR = 67
          LEN = 69
          COW_REFCNT = 1

That shows that string-overloading does not happen from XS
If I change the .t invocation to

    my $im = Image::Scale->new( Path::Tiny::path( _f("jpg/rgb.jpg") )->stringify );
    $im->save_jpeg( Path::Tiny::path($outjpg)->stringify );
    $im->save_png( Path::Tiny::path($outpng)->stringify );

in all locations where this happens, all tests pass.
I have updated the ticket, but is this a incompatibility change
somewhere?

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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