You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2004/07/11 21:31:53 UTC

[apreq-2] magic of type \\126

With the current cvs, I'm getting errors when running
the perl glue tests of
   Don't know how to handle magic of type \\126
and then it references a line in the response .pm
file where $req->param is called. This is with
perl-5.8.0. Does "126" refer to PERL_MAGIC_ext
(chr(126) = '~')?

-- 
best regards,
randy


Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 12 Jul 2004, Joe Schaefer wrote:

[ ... ]
> If you can add an appropriate conditional for
> APREQ_XS_TABLE_USE_KEY_MAGIC (it requires perl 5.8.1),
> that will help with 5.6.1 and 5.8.0 support.

OK, I've done that, requiring 5.8.1 or larger.
I'll also look at fixing the tests in this case.

> I should also point out that this key-magic stuff
> really abuses perl's v-string support to get the
> desired behavior.  If all we wanted to do is let
> each () work right, they key-magic stuff isn't
> really necessary.  It just lets the rest of our
> API DTRT in the multivalued-key case.

-- 
best regards,
randy


Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

[...]

> I should have mentioned - that was with the
>    #define APREQ_XS_TABLE_USE_KEY_MAGIC
> commented out. With it left in (ie, with the
> cvs version of apreq_xs_tables.h), all perl
> glue tests pass, including the upload test
> I sent along earlier today (do you want me to
> commit that?).

+1.  If you can add an appropriate conditional for 
APREQ_XS_TABLE_USE_KEY_MAGIC (it requires perl 5.8.1),
that will help with 5.6.1 and 5.8.0 support.

I should also point out that this key-magic stuff 
really abuses perl's v-string support to get the 
desired behavior.  If all we wanted to do is let 
each () work right, they key-magic stuff isn't 
really necessary.  It just lets the rest of our
API DTRT in the multivalued-key case.

-- 
Joe Schaefer


Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 11 Jul 2004, Randy Kobes wrote:

> Sorry about this - it was a problem on my end. I was using a
> mod_perl.lib compiled with perl-5.8.0 - I thought it was
> compatible with 5.8.4, but I guess there's some difference.
> Anyway, after installing the 5.8.4 lib, you're right that
> all the request.pm tests pass except for the last one, and
>    values test failed: 'disable_uploads:bar1:bar1"
> appears in the error log.

I should have mentioned - that was with the
   #define APREQ_XS_TABLE_USE_KEY_MAGIC
commented out. With it left in (ie, with the
cvs version of apreq_xs_tables.h), all perl
glue tests pass, including the upload test
I sent along earlier today (do you want me to
commit that?).

Sorry again for the false alarm ...

-- 
best regards,
randy

Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 12 Jul 2004, Joe Schaefer wrote:

> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
>
> [...]
>
> > Unfortunately, on my perl-5.8.4, with this commented out,
> > all the request.pm tests still fail, with the message of use
> > of an uninitialized value in subroutine entry at line 64 in
> > Apache/Request.pm.
>
> To debug this (sorry I can't reproduce it here yet),
> you might want to look at what's showing up in request.pm's
> $temp_dir variable:
>
>     my $temp_dir = $r->server->server_root_relative('logs');
>     my $req = Apache::Request->new($r, POST_MAX => 1_000_000,
>                                        TEMP_DIR => $temp_dir);
>
>
> I suspect $temp_dir is an undef for you; don't know why tho.

Sorry about this - it was a problem on my end. I was using a
mod_perl.lib compiled with perl-5.8.0 - I thought it was
compatible with 5.8.4, but I guess there's some difference.
Anyway, after installing the 5.8.4 lib, you're right that
all the request.pm tests pass except for the last one, and
   values test failed: 'disable_uploads:bar1:bar1"
appears in the error log.

-- 
best regards,
randy

Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

[...]

> Unfortunately, on my perl-5.8.4, with this commented out,
> all the request.pm tests still fail, with the message of use
> of an uninitialized value in subroutine entry at line 64 in
> Apache/Request.pm.

To debug this (sorry I can't reproduce it here yet),
you might want to look at what's showing up in request.pm's
$temp_dir variable:

    my $temp_dir = $r->server->server_root_relative('logs');
    my $req = Apache::Request->new($r, POST_MAX => 1_000_000,
                                       TEMP_DIR => $temp_dir);


I suspect $temp_dir is an undef for you; don't know why tho.

-- 
Joe Schaefer


Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 11 Jul 2004, Joe Schaefer wrote:

> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
>
> [...]
>
> > You're right - commenting that out does get all the tests
> > to pass, save the last one in request.t. This is with
> > perl-5.8.0.
>
> OK- looks like PERL_MAGIC_vstring isn't available in 5.8.0,
> so if that feature turns out to be worthwhile it'll require 5.8.1
> or better.

OK ...

> How does 5.8.4 fare with this commented out?  In the
> final request.pm test, I'm still expecting the each()
> test to pass, but the values test to fail- the bottom
> of the error_log should have a line containing
>
>   values test failed: 'disable_uploads:bar1:bar1'

Unfortunately, on my perl-5.8.4, with this commented out,
all the request.pm tests still fail, with the message of use
of an uninitialized value in subroutine entry at line 64 in
Apache/Request.pm.

-- 
best regards,
randy

Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Joe Schaefer <jo...@sunstarsys.com> writes:

> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
> 
> [...]
> 
> > You're right - commenting that out does get all the tests
> > to pass, save the last one in request.t. This is with
> > perl-5.8.0.
> 
> OK- looks like PERL_MAGIC_vstring isn't available in 5.8.0,
> so if that feature turns out to be worthwhile it'll require 5.8.1
> or better.

FYI- regarding the subject line: 'V' is \0126 (octal),
which is what PERL_MAGIC_vstring represents. Lovely coincidence
that 126 just so happens to be ord '~' :-).

-- 
Joe Schaefer


Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

[...]

> You're right - commenting that out does get all the tests
> to pass, save the last one in request.t. This is with
> perl-5.8.0.

OK- looks like PERL_MAGIC_vstring isn't available in 5.8.0,
so if that feature turns out to be worthwhile it'll require 5.8.1
or better.

How does 5.8.4 fare with this commented out?  In the 
final request.pm test, I'm still expecting the each()
test to pass, but the values test to fail- the bottom
of the error_log should have a line containing

  values test failed: 'disable_uploads:bar1:bar1'

-- 
Joe Schaefer


Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 11 Jul 2004, Joe Schaefer wrote:

> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
>
> [...]
>
> > Yes, the same error's there, with perl-5.8.0 (Win32,
> > Apache/2.0.50). With perl-5.8.4 this error isn't there, but
> > all of the request.t tests of the perl glue fail,
>
> That's very strange, because that particular error message
> only gets generated via sv_magic(), which has supported
> PERL_MAGIC_ext since at least 5.7.3 (probably *much* longer
> than that, but 5.7.3 is the oldest perl source I've got handy).
>
> > with a message in the error log appearing about the use of an
> > uninitialized value in a subroutine entry on line 64 of
> > Apache/Request.pm.
>
> Line 64 looks like "$req->config(@_)" which AFAICT
> isn't related to the new "magic keys" business.
> The only recent activity on apreq_xs_request_config
> was getting UPLOAD_HOOK implemented, which was a few
> days ago.
>
> Today's commits are probably corrupting memory somewhere.
> Could you try running the tests again with the
>
> #define APREQ_XS_TABLE_USE_KEY_MAGIC
>
> commented out in apreq_xs_tables.h?  That'll disable
> the magic key code, so we can start narrowing down
> the problem.  When you do thism expect the last test
> in request.t to fail, but all the others should pass
> again.

You're right - commenting that out does get all the tests
to pass, save the last one in request.t. This is with
perl-5.8.0.

-- 
best regards,
randy

Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

[...]

> Yes, the same error's there, with perl-5.8.0 (Win32,
> Apache/2.0.50). With perl-5.8.4 this error isn't there, but
> all of the request.t tests of the perl glue fail, 

That's very strange, because that particular error message 
only gets generated via sv_magic(), which has supported 
PERL_MAGIC_ext since at least 5.7.3 (probably *much* longer 
than that, but 5.7.3 is the oldest perl source I've got handy). 

> with a message in the error log appearing about the use of an
> uninitialized value in a subroutine entry on line 64 of
> Apache/Request.pm.

Line 64 looks like "$req->config(@_)" which AFAICT 
isn't related to the new "magic keys" business.
The only recent activity on apreq_xs_request_config 
was getting UPLOAD_HOOK implemented, which was a few
days ago.

Today's commits are probably corrupting memory somewhere.
Could you try running the tests again with the

#define APREQ_XS_TABLE_USE_KEY_MAGIC

commented out in apreq_xs_tables.h?  That'll disable
the magic key code, so we can start narrowing down
the problem.  When you do thism expect the last test 
in request.t to fail, but all the others should pass
again.

-- 
Joe Schaefer


Re: [apreq-2] magic of type \\126

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 11 Jul 2004, Joe Schaefer wrote:

> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
>
> > With the current cvs, I'm getting errors when running
> > the perl glue tests of
> >    Don't know how to handle magic of type \\126
> > and then it references a line in the response .pm
> > file where $req->param is called. This is with
> > perl-5.8.0. Does "126" refer to PERL_MAGIC_ext
> > (chr(126) = '~')?
>
> I just changed the key magic to PERL_MAGIC_vstring.
> Do you still get this error message with current cvs?

Yes, the same error's there, with perl-5.8.0 (Win32,
Apache/2.0.50). With perl-5.8.4 this error isn't there, but
all of the request.t tests of the perl glue fail, with a
message in the error log appearing about the use of an
uninitialized value in a subroutine entry on line 64 of
Apache/Request.pm.

-- 
best regards,
randy

Re: [apreq-2] magic of type \\126

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

> With the current cvs, I'm getting errors when running
> the perl glue tests of
>    Don't know how to handle magic of type \\126
> and then it references a line in the response .pm
> file where $req->param is called. This is with
> perl-5.8.0. Does "126" refer to PERL_MAGIC_ext
> (chr(126) = '~')?

I just changed the key magic to PERL_MAGIC_vstring.  
Do you still get this error message with current cvs?

-- 
Joe Schaefer