develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991116.002] perl5.005_02: my_setenv() and Term::ReadLine::Gnu

From:
Rasmus Tamstorf
Date:
November 18, 1999 16:58
Subject:
Re: [ID 19991116.002] perl5.005_02: my_setenv() and Term::ReadLine::Gnu
Message ID:
Pine.SGI.4.10.9911181653300.12560-100000@bacon.fan.fa.disney.com
On Fri, 19 Nov 1999, Joerg Schumacher wrote:

<--- my_setenv() problem --->

Maybe I should have piped in before, but I think someone else has
mentioned it : The whole my_setenv / putenv setup was modified somewhat
between 5.00503 and the current devcut due to a bug I reported about a
year ago. Thus, you should do the bugreport, testing and patching against
the latest devcut. Not 5.00503.

Rasmus

> The following two testcases show the bug on my Solaris 5.5.1 box with 
> perl5.00503, Term-ReadLine-Gnu-1.07 and readline-4.0:
> 
> -----------------------------------------------------------------
> #!/tmp/perl/bin/perl 
> # dumps core if LINES and COLUMNS aren't defined in the env:
> #0  0xef5cc5a0 in _free_unlocked ()
> #1  0xef5cc560 in free ()
> #2  0x507b8 in Perl_safefree (where=0xeffffa79) at util.c:173
> #3  0x550f4 in Perl_magic_clear_all_env (sv=0x0, mg=0xc98e0) at mg.c:785
> #....
> use Term::ReadLine;
> $RL = new Term::ReadLine 'foo';
> undef %ENV;
> -----------------------------------------------------------------
> #!/tmp/perl/bin/perl 
> # dumps core if LINES and COLUMNS aren't defined in the env:
> #0  0xef5cc5a0 in _free_unlocked ()
> #1  0xef5cc560 in free ()
> #2  0x507b8 in Perl_safefree (where=0xeffffcff) at util.c:173
> #3  0x52af8 in Perl_my_setenv (nam=0xd0128 "PATH", val=0xd1890 "/foobar")
> #   at util.c:1443
> #....
> use Term::ReadLine;
> $RL = new Term::ReadLine 'foo';
> $ENV{PATH} = "/foobar";
> -----------------------------------------------------------------
> 
> 
> I'm not familiar with the perl source so I leave it up to you to
> invent a correct patch.
> 
> Regards,
> Joerg 
> 
> -- 
>  Gaertner Datensysteme                         38114 Braunschweig 
>  Joerg Schumacher                              Hamburger Str. 273a
>  Tel: 0531-2335555          		       Fax: 0531-2335556
> 

-----------------------------------------------------------------------------
Rasmus.Tamstorf@disney.com         "A problem worthy of attack, 
Walt Disney Feature Animation       proves its worth by hitting back" Kumbel
-----------------------------------------------------------------------------




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About