Bug 68701 - undef $ENV{'MPAGE'} causes mpage subproc to coredump
Summary: undef $ENV{'MPAGE'} causes mpage subproc to coredump
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: mpage
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: 67218
TreeView+ depends on / blocked
 
Reported: 2002-07-12 16:48 UTC by Jonathan Kamens
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-07-16 14:17:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2002-07-12 16:48:31 UTC
With perl-5.8.0-31 and mpage-2.5.2-3, run this Perl script:

----- cut here -----
#!/usr/bin/perl

undef $ENV{'MPAGE'};

if (! open(MPAGE, '|-')) {
    exec('mpage');
}

close(MPAGE) || die;
----- cut here -----

If you change "undef $ENV{'MPAGE'}" to "delete $ENV{'MPAGE'}", the coredump goes
away.

I realize that it is correct to use "delete" and incorrect to use "undef", but I
don't think this behavior is reasonable, especially since it worked just fine in
perl 5.6.1.

Comment 1 Chip Turner 2002-07-15 13:41:48 UTC
The coredump is in mpage.  Reproducible via:

MPAGE= mpage

The perl difference is "undef $ENV{BAZ}" makes an env variable called BAZ and
assigns undef to it, which, in a subshell, becomes the empty string.

Comment 2 Jonathan Kamens 2002-07-15 14:11:22 UTC
If the coredump is in mpage, then the right thing to do is to change the
component to mpage, not to close the bug, eh?


Comment 3 Tim Waugh 2002-07-16 14:17:22 UTC
Fixed package is mpage-2.5.2-4.

Comment 4 Jay Turner 2002-09-04 03:00:28 UTC
Fix confirmed with mpage-2.5.2-4.


Note You need to log in before you can comment on or make changes to this bug.