Bug 68701 - undef $ENV{'MPAGE'} causes mpage subproc to coredump
undef $ENV{'MPAGE'} causes mpage subproc to coredump
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: mpage (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks: 67218
  Show dependency treegraph
 
Reported: 2002-07-12 12:48 EDT by Jonathan Kamens
Modified: 2007-04-18 12:44 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-16 10:17:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2002-07-12 12:48:31 EDT
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 09:41:48 EDT
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 10:11:22 EDT
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 10:17:22 EDT
Fixed package is mpage-2.5.2-4.
Comment 4 Jay Turner 2002-09-03 23:00:28 EDT
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.