Perl 5.26 is removing the implicit CWD in @INC for security reasons, and this
affects loading of perl code from files in both "require" and "do".

Subsequently, both these lines in run_make_tests.pl no longer do as intended:

require "test_driver.pl";
require "config-flags.pm"

Affected end users can apply a temporary workaround of PERL_USE_UNSAFE_INC=1
which should return makes tests to passing.

But a long term strategy of forcing an explicit path loading should be applied.

For instance:

1. Put required libraries in a specific directory
2. `use lib "directory'` 

Alternatively, specifying a clearly relative/absolute path to the file
can side-step the @INC traversal mechanic.

  require "./test_driver.pl";
  require "./config-flags.pm"

Some constructions with FindBin.pm can also be useful, as can forcing an
absolute path with File::Spec->rel2abs(), for instance:

   my $file = File::Spec->rel2abs("test_driver.pl");
   require "$file";

And at a pinch, simply injecting an explict:

   use lib '.'

Will work, ( but it will be subject to security risks/breakage if
any part of your process changes cwd )

This failure was exposed testing Make against Perl 5.25.11 pre-release,
at Gentoo bug: https://bugs.gentoo.org/613772


Attachment: pgpkTM3fjxy7p.pgp
Description: OpenPGP digital signature

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to