Bug 68701 - undef $ENV{'MPAGE'} causes mpage subproc to coredump
undef $ENV{'MPAGE'} causes mpage subproc to coredump
Product: Red Hat Raw Hide
Classification: Retired
Component: mpage (Show other bugs)
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:
Last Closed: 2002-07-16 10:17:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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 -----

undef $ENV{'MPAGE'};

if (! open(MPAGE, '|-')) {

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

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

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.