This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid miniperl SEGVing when processing -I on the #! line
authorNicholas Clark <nick@ccl4.org>
Sat, 5 Mar 2011 18:14:47 +0000 (18:14 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 5 Mar 2011 18:14:47 +0000 (18:14 +0000)
commit59d6f6a4c05afa7f69dc616d7a7f7446ceb5433a
tree4fcd0d4434cb6e6f016fd87450f6a2df9a602c3f
parent816005240f1a3b9989c940e630e829048597537c
Avoid miniperl SEGVing when processing -I on the #! line

A side-effect of change 3185893b8dec1062 was to force av in S_incpush() to be
NULL, whilst other flag variables were still set as if it were non-NULL, for
certain cases, only when compiled with -DPERL_IS_MINIPERL

The "obvious" fix is to also set all the flag variables to 0 under
-DPERL_IS_MINIPERL, to make everything consistent. However, this confuses (at
least) the local version of gcc, which issues warnings about passing a NULL
value (av, known always to be NULL) as a not-NULL parameter, despite the fact
that all the relevant calls are inside blocks which are actually dead code,
due to the if() conditions being const variables set to 0 under
-DPERL_IS_MINIPERL.

So to avoid future bug reports about compiler warnings, the least worst thing
to do seems to be to use #ifndef to use the pre-processor to eliminate the
dead code, and related variables.
embed.fnc
embed.h
perl.c
proto.h