Re: Bus error in LWP/Perl5

Nik Clayton (nik@blueberry.co.uk)
Thu, 16 Nov 1995 13:56:23 +0000 ()


> --- Socket.pm   1995/10/19 18:11:36     1.16
> +++ Socket.pm   1995/11/05 11:16:59
> @@ -262,7 +262,8 @@
>  sub pushback
>  {
>      LWP::Debug::trace('(...)');
> -    substr(shift->{'buffer'}, 0, 0) = shift;
> +    my $self = shift;
> +    substr($self->{'buffer'}, 0, 0) = shift;
>  }

Just got the chance to try this (back from my holidays). After making
this change the test suite fails.

    # cd t
    # ./TEST -v base/headers.t
    base/headers........1..8
    ok 1
    ok 2
    ok 3
    ok 4

    Header looks like this now:
    MY-Header: foo
    MIME-Version: 1.0
    Content-Type: text/html
    Accept: text/plain
    Accept: image/*
    Accept: audio/basic

    ok 5
    ok 6
    ok 7
    Headers are 'MY-Header;MIME-Version;Content-Type;Accept;Accept;Accept',
    expected    'MIME-Version;Accept;Accept;Accept;Content-Type;MY-Header' 
    not ok 8
    FAILED on test 8
    Failed 1 test, 0.00% okay.
    Files=1,  Tests=8,  0 secs ( 0.35 cusr  0.07 csys =  0.42 cpu)

Anyone else seeing this?

This is after applying the patch above and the "Socket::sockaddr_in"
patch (mentioned previously in this discussion) to _getaddress, both in
the LWP/Socket.pm file.

Other than that, these patches appear to have succesfully fixed the
"numeric IP address" and "core dumping" problems I detailed a few weeks
ago.

N
-- 
--+=[ Blueberry Hill                   Blueberry Design                   ]=+--
--+=[ http://www.blueberry.co.uk/      1/9 Chelsea Harbour Design Centre, ]=+--
--+=[ WebMaster@blueberry.co.uk        London, England, SW10 0XE          ]=+--