Bug 68701

Summary: undef $ENV{'MPAGE'} causes mpage subproc to coredump
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <jik>
Component: mpageAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-16 14:17:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 67218    

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.