Bug 683734 - ksh crashes when IFS is unset inside a function
Summary: ksh crashes when IFS is unset inside a function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ksh
Version: 6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 683722
Blocks: 727223 727891
TreeView+ depends on / blocked
 
Reported: 2011-03-10 08:41 UTC by Michal Hlavinka
Modified: 2018-11-14 12:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 683722
: 727223 727891 (view as bug list)
Environment:
Last Closed: 2011-12-06 16:18:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1647 0 normal SHIPPED_LIVE ksh bug fix update 2011-12-06 00:50:33 UTC

Comment 2 eddie.quinteros 2011-05-17 21:19:06 UTC
The problem can be seen by running the following script.

$ more ks6f3
#!/bin/ksh
function vlfunc {
  print "begin vlfunc"
  typeset IFS="$IFS"

  while read line
  do
    :
  done < /dev/null
  print "$( vlsub_func )"
  print END
}

function vlsub_func {
  print "begin vlsub_func"
  vlsub_sub_func
  IFS="DEF"
  vlsub_sub_func
  print "end vlsub_func"
  return
}

function vlsub_sub_func {
  print "begin vlsub_sub_func"
  IFS="abc"
  print "end vlsub_sub_func"
}

########################################
# run main, set up clean exit
#
IFS="hold"
vlfunc
vlfunc
vlfunc
[vern@vernsf2 test-ksh]$ ./ks6f3
begin vlfunc
begin vlsub_func
begin vlsub_sub_func
end vlsub_sub_func
begin vlsub_sub_func
end vlsub_sub_func
end vlsub_func
END
begin vlfunc
Segmentation fault (core dumped)
[vern@vernsf2 test-ksh]$

Comment 7 errata-xmlrpc 2011-12-06 16:18:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1647.html


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