diff options
author | Tomasz Konojacki <me@xenu.pl> | 2022-04-19 16:41:23 +0200 |
---|---|---|
committer | xenu <me@xenu.pl> | 2022-05-29 00:54:10 +0200 |
commit | ae6b6b71cdbfb3fb6e1192178fa1e530a2f07ece (patch) | |
tree | 19d644c0277a598f8f5b2062ef20b43d78591c61 /ext/ExtUtils-Miniperl/lib | |
parent | b95d23342a119c6677aa5ad786ca7d002c98bef2 (diff) | |
download | perl-ae6b6b71cdbfb3fb6e1192178fa1e530a2f07ece.tar.gz |
make PERL_USE_SAFE_PUTENV the default and the only option
Now environ isn't owned by Perl and calling setenv/putenv in XS code
will no longer result in memory corruption.
Fixes #19399
Diffstat (limited to 'ext/ExtUtils-Miniperl/lib')
-rw-r--r-- | ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm index e90b4aeb09..38a37244e2 100644 --- a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm +++ b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm @@ -5,7 +5,7 @@ use Exporter 'import'; use ExtUtils::Embed 1.31, qw(xsi_header xsi_protos xsi_body); our @EXPORT = qw(writemain); -our $VERSION = '1.11'; +our $VERSION = '1.12'; # blead will run this with miniperl, hence we can't use autodie or File::Temp my $temp; @@ -99,9 +99,6 @@ main(int argc, char **argv, char **env) #ifndef NO_ENV_ARRAY_IN_MAIN PERL_UNUSED_ARG(env); #endif -#ifndef PERL_USE_SAFE_PUTENV - PL_use_safe_putenv = FALSE; -#endif /* PERL_USE_SAFE_PUTENV */ /* if user wants control of gprof profiling off by default */ /* noop unless Configure is given -Accflags=-DPERL_GPROF_CONTROL */ @@ -154,19 +151,6 @@ main(int argc, char **argv, char **env) perl_free(my_perl); -#if defined(USE_ENVIRON_ARRAY) && defined(PERL_TRACK_MEMPOOL) && !defined(NO_ENV_ARRAY_IN_MAIN) - /* - * The old environment may have been freed by perl_free() - * when PERL_TRACK_MEMPOOL is defined, but without having - * been restored by perl_destruct() before (this is only - * done if destruct_level > 0). - * - * It is important to have a valid environment for atexit() - * routines that are eventually called. - */ - environ = env; -#endif - PERL_SYS_TERM(); exit(exitstatus); |