Bug#981408: libdevel-mat-dumper-perl: encodes Perl version into the binary, needs stricter dependencies

Niko Tyni ntyni at debian.org
Sat Jan 30 18:14:19 GMT 2021


Package: libdevel-mat-dumper-perl
Version: 0.42-2 
Severity: important

This package compiles Perl version information into the binary module at
build time, and fails its test suite if run on a different minor version
of Perl.

>From a failing autopkgtest run with perl_5.32.1-1 in experimental:

  t/01header.t .. 
  ok 1 - Write dumpfile
  ok 2 - File magic signature
  ok 3 - Flags
  ok 4 - Zero
  ok 5 - Major
  ok 6 - Minor
  not ok 7 - Perlver
  
  #   Failed test 'Perlver'
  #   at t/01header.t line 42.
  #          got: '85983232'
  #     expected: '85983233'

Here the binary was built with 5.32.0, but run on 5.32.1. The
dependencies currently allow this, as 5.32.1 is supposed to
be binary compatible.

This stems from lib/Devel/MAT/Dumper.xs:950 or so:

  write_u32(fh, PERL_REVISION<<24 | PERL_VERSION<<16 | PERL_SUBVERSION);

where the PERL_xxx constants are preprocessor symbols and so expanded
at build time.

Given this in the module description:

    The dump file will contain a representation of every SV in Perl's
    arena, providing information about pointers between them, as well
    as other information about the state of the process at the time it
    was created.

it sounds possibly fragile to me and should probably declare a strict
dependency on the same Perl upstream version it was built with, in the
same vein as for instance libclass-xsaccessor-perl.

(I fear this might even break between different builds of the same Perl
version, but triggering rebuilds on every src:perl upload seems like a
major pain on the current Debian infrastructure. I suggest we don't go
there unless we really have to.)
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list