Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBC: SYBER/Test-Catch-2.0.1.tar.gz et al.: Attempt to access disallowed key 'xsi' in a restricted hash #22713

Open
eserte opened this issue Oct 30, 2024 · 9 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@eserte
Copy link
Contributor

eserte commented Oct 30, 2024

Since perl 5.41.4 (not known for 5.41.3) some modules cannot be built anymore due to the following error:

Attempt to access disallowed key 'xsi' in a restricted hash at /home/e/eserte/.cpan/build/2024093023/XS-Install-1.3.5-1/blib/lib/XS/Install/ParseXS.pm line 81, <__ANONIO__> line 356.

CPAN distributions affected are

  • SYBER/Test-Catch-2.0.1.tar.gz
  • SYBER/next-XS-1.0.7.tar.gz
  • DMOL/CPP-geos-3.7.3.1.tar.gz

All of these fail in the same XS::Install::ParseXS line.

A matrix link for the 1st of these: https://fast2-matrix.cpantesters.org/?dist=Test-Catch-2.0.1

@eserte eserte added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Needs Triage labels Oct 30, 2024
@jkeenan
Copy link
Contributor

jkeenan commented Oct 30, 2024

In the time available to me I was able to bisect only one of the three failing distributions. Testing Test::Catch on unthreaded builds on Linux with the following invocation:

perl Porting/bisect.pl \
--start=bcb5884b9b0ae1345ac74420bacb865ba11baab3 \
--end=v5.41.4 \
--module=Test::Catch

... bisection pointed to c85d5a6 as the first bad commit.

c85d5a67185efe2ff72c5c523fa070bbc7ccecdf is the first bad commit
commit c85d5a67185efe2ff72c5c523fa070bbc7ccecdf
Author: David Mitchell <[email protected]>
Date:   Thu Aug 8 11:19:46 2024 +0100
Commit:     David Mitchell <[email protected]>
CommitDate: Thu Aug 15 19:31:22 2024 +0100

    ExtUtils::ParseXS: rename most object fields
    
    This big commit renames around 60 of the 75-or-so fields within an
    ExtUtils::ParseXS hash object.
    
    This is because many of the current names are confusing and follow no
    particular pattern.

@iabyn, can you take a look? Thanks.

UPDATE: Bisecting with this invocation:

$ perl Porting/bisect.pl \
--start=bcb5884b9b0ae1345ac74420bacb865ba11baab3 \
--end=v5.41.4 \
--module=next::XS

... showed that c85d5a6 was also the breaking commit for next::XS.

@Leont
Copy link
Contributor

Leont commented Oct 30, 2024

That code starts with

my $orig_pmxl = \&ExtUtils::ParseXS::_process_module_xs_line;
*ExtUtils::ParseXS::_process_module_xs_line = sub {

When you're monkey patching like that, you shouldn't be surprised when things break. And that's far from the only method it patches. XS::Install is very much voiding any warranty IMO.

@jkeenan
Copy link
Contributor

jkeenan commented Oct 30, 2024

Testing CPP::geos on unthreaded builds on Linux with the following invocation:

$ perl Porting/bisect.pl \
--start=bcb5884b9b0ae1345ac74420bacb865ba11baab3 \
--end=v5.41.4 \
--module=CPP::geos

... bisection pointed to 9cd5757 as the breaking commit.

9cd5757dce9a4cb7bc255f52e311c32cffe78969 is the first bad commit
commit 9cd5757dce9a4cb7bc255f52e311c32cffe78969
Author: David Mitchell <[email protected]>
Date:   Fri Aug 16 13:49:15 2024 +0100
Commit:     David Mitchell <[email protected]>
CommitDate: Mon Aug 19 11:32:03 2024 +0100

    ParseXS: stop inadvertently disabling field checks

@iabyn, can you take a look? Thanks.

@jkeenan
Copy link
Contributor

jkeenan commented Nov 10, 2024

@iabyn, could you comment on the 2 breaking commits mentioned above? Thanks.

@Leont
Copy link
Contributor

Leont commented Nov 11, 2024

@iabyn, could you comment on the 2 breaking commits mentioned above? Thanks.

I'm not sure what you want him to look at exactly, the problem is already understood. XS::Install::ParseXS is fiddling around with ExtUtils::ParseXS in ways that break its encapsulation because it's now using fields, so X::I will have to adapt to these changes. That's up to @syberrus to fix really.

@jkeenan
Copy link
Contributor

jkeenan commented Nov 11, 2024

@iabyn, could you comment on the 2 breaking commits mentioned above? Thanks.

I'm not sure what you want him to look at exactly, the problem is already understood. XS::Install::ParseXS is fiddling around with ExtUtils::ParseXS in ways that break its encapsulation because it's now using fields, so X::I will have to adapt to these changes. That's up to @syberrus to fix really.

The XS-Install distribution is currently passing all its tests at CPANtesters. Hence, its maintainer may not be aware of these problems. Could you post a ticket about them at https://rt.cpan.org/Dist/Display.html?Name=XS-Install? Thanks.

@Leont
Copy link
Contributor

Leont commented Nov 11, 2024

The XS-Install distribution is currently passing all its tests at CPANtesters. Hence, its maintainer may not be aware of these problems. Could you post a ticket about them at https://rt.cpan.org/Dist/Display.html?Name=XS-Install? Thanks.

https://rt.cpan.org/Ticket/Display.html?id=15702

@iabyn
Copy link
Contributor

iabyn commented Nov 18, 2024 via email

@syberrus
Copy link
Contributor

syberrus commented Nov 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Projects
None yet
Development

No branches or pull requests

5 participants