You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2002/04/15 19:20:20 UTC
Re: giving some context for Perl_croak in xs code
Stas Bekman wrote:
> there are taint mode problems with modperl-1.x and the latest
> bleadperl (testing with 15887).
>
> In addition to the taint bugs in Cwd that I'm trying to solve (see
> my report at p5p, including a partial patch), there is another
> taint problem when trying to start mod_perl 1.x cvs's 'make test'
>
> In the t/logs/error_log you get simply: Insecure dependency in eval
> while running with -T switch. and the server won't start.
I can verify this.
$ MOD_PERL_TRACE=all make test
consistently fails here:
reloading Cwd.pm
reloading Carp/Heavy.pm
reloading Apache/RegistryLoader.pm
reloading docs/LoadClass.pm
reloading Fcntl.pm
reloading Symbol.pm
reloading ExtUtils/testlib.pm
reloading URI.pm
reloading IO/Socket/INET.pm
Insecure dependency in eval while running with -T switch.
Callback called exit.
I assumed that IO::Socket::INET was the problem and went about trying to
reproduce the problem by deleting %INC myself but couldn't using plain
perl. A quick look at bleedperl's Changes didn't have anything that
jumped out at me in the past two weeks (since I know all tests passed
with bleedperl when the 1.27 candidate was released)
HTH
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: giving some context for Perl_croak in xs code
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>
> Stas Bekman wrote:
>
>> Geoffrey Young wrote:
>>
>>>
>>>
>>> Stas Bekman wrote:
>>>
>>> > there are taint mode problems with modperl-1.x and the latest
>>> > bleadperl (testing with 15887).
>>> >
>>> > In addition to the taint bugs in Cwd that I'm trying to solve (see
>>> > my report at p5p, including a partial patch), there is another
>>> > taint problem when trying to start mod_perl 1.x cvs's 'make test'
>>> >
>>> > In the t/logs/error_log you get simply: Insecure dependency in eval
>>> > while running with -T switch. and the server won't start.
>>
>>
>>
>> BTW, update your bleadperl, one of my patches was applied already (the
>> other pending is irrelevant to modperl at this moment).
>
>
>
> I did that this morning - I don't think your patch made it to rsync yet :)
Really? that's weird. Try this:
http://archive.develooper.com/perl5-porters@perl.org/msg77510.html
>> cool Geoff :) I didn't think of using TRACE :) But we still don't know
>> if the problem happens in INET.pm or after it because the trace is
>> printed before the require and not after it.
>>
>> MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
>> perl_require_pv(HeKEY(entry));
>
>
>
> well, when I traced the code, "Callback called exit" happens in
> perl_eval_sv, which is called by perl_require_pv. of course, other
> things can call it too, but I figured not much else was happening in
> that loop other than just requiring lots of modules - on my system
> Exporter is next in the chain.
>
> nevertheless, this addition to perl_util.c
>
> @@ -504,6 +504,7 @@
> HeVAL(entry) = &sv_undef;
> MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
> perl_require_pv(HeKEY(entry));
> + MP_TRACE_g(fprintf(stderr, "done with %s\n", HeKEY(entry)));
> }
> SvREFCNT_dec(keysv);
> }
>
> yields
>
> reloading ExtUtils/testlib.pm
> done with ExtUtils/testlib.pm
> reloading URI.pm
> done with URI.pm
> reloading IO/Socket/INET.pm
> Insecure dependency in eval while running with -T switch.
> Callback called exit.
>
> however, if I comment out the INET.pm load in IO::Socket, then it fails
> on reloading Exporter.pm.
>
> so, something strange is going on :)
well, at least we know where this happens. It's probably that INET.pm
and Exporter go through the same path somewhere. Try to set a breakpoint
in the taint checking function (just before you call perl_eval_sv) and
then trace back to the offender.
Any idea about my side-effect question - how to make Perl_croak, do
Croak::confess for the C/XS code? This would give us the problematic
code immediately.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: giving some context for Perl_croak in xs code
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Stas Bekman wrote:
> Geoffrey Young wrote:
>
>>
>>
>> Stas Bekman wrote:
>>
>> > there are taint mode problems with modperl-1.x and the latest
>> > bleadperl (testing with 15887).
>> >
>> > In addition to the taint bugs in Cwd that I'm trying to solve (see
>> > my report at p5p, including a partial patch), there is another
>> > taint problem when trying to start mod_perl 1.x cvs's 'make test'
>> >
>> > In the t/logs/error_log you get simply: Insecure dependency in eval
>> > while running with -T switch. and the server won't start.
>
>
> BTW, update your bleadperl, one of my patches was applied already (the
> other pending is irrelevant to modperl at this moment).
I did that this morning - I don't think your patch made it to rsync yet :)
> cool Geoff :) I didn't think of using TRACE :) But we still don't know
> if the problem happens in INET.pm or after it because the trace is
> printed before the require and not after it.
>
> MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
> perl_require_pv(HeKEY(entry));
well, when I traced the code, "Callback called exit" happens in
perl_eval_sv, which is called by perl_require_pv. of course, other
things can call it too, but I figured not much else was happening in
that loop other than just requiring lots of modules - on my system
Exporter is next in the chain.
nevertheless, this addition to perl_util.c
@@ -504,6 +504,7 @@
HeVAL(entry) = &sv_undef;
MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
perl_require_pv(HeKEY(entry));
+ MP_TRACE_g(fprintf(stderr, "done with %s\n", HeKEY(entry)));
}
SvREFCNT_dec(keysv);
}
yields
reloading ExtUtils/testlib.pm
done with ExtUtils/testlib.pm
reloading URI.pm
done with URI.pm
reloading IO/Socket/INET.pm
Insecure dependency in eval while running with -T switch.
Callback called exit.
however, if I comment out the INET.pm load in IO::Socket, then it fails
on reloading Exporter.pm.
so, something strange is going on :)
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: giving some context for Perl_croak in xs code
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>
> Stas Bekman wrote:
>
> > there are taint mode problems with modperl-1.x and the latest
> > bleadperl (testing with 15887).
> >
> > In addition to the taint bugs in Cwd that I'm trying to solve (see
> > my report at p5p, including a partial patch), there is another
> > taint problem when trying to start mod_perl 1.x cvs's 'make test'
> >
> > In the t/logs/error_log you get simply: Insecure dependency in eval
> > while running with -T switch. and the server won't start.
BTW, update your bleadperl, one of my patches was applied already (the
other pending is irrelevant to modperl at this moment).
> I can verify this.
>
> $ MOD_PERL_TRACE=all make test
>
> consistently fails here:
>
> reloading Cwd.pm
> reloading Carp/Heavy.pm
> reloading Apache/RegistryLoader.pm
> reloading docs/LoadClass.pm
> reloading Fcntl.pm
> reloading Symbol.pm
> reloading ExtUtils/testlib.pm
> reloading URI.pm
> reloading IO/Socket/INET.pm
> Insecure dependency in eval while running with -T switch.
> Callback called exit.
cool Geoff :) I didn't think of using TRACE :) But we still don't know
if the problem happens in INET.pm or after it because the trace is
printed before the require and not after it.
MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
perl_require_pv(HeKEY(entry));
Need to try to eliminate the use of INET.pm and test again.
or to try to adjust the C code to print the tracing code above after
require() to narrow the problem down.
> I assumed that IO::Socket::INET was the problem and went about trying to
> reproduce the problem by deleting %INC myself but couldn't using plain
> perl. A quick look at bleedperl's Changes didn't have anything that
> jumped out at me in the past two weeks (since I know all tests passed
> with bleedperl when the 1.27 candidate was released)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org