ksh segfaults if unset running function from another one

Solution Verified - Updated -

Issue

  • When leaving function which was unset in the meantime ksh segfaults on the line:
  • Steps to Reproduce:
1. create a script test.sh:
#!/bin/ksh

function ftest {
        ftest2
}


function ftest2 {
        unset -f ftest
}

ftest


2. run the script

Actual results:

Segmentation fault (core dumped)

Environment

  • Red Hat Enterprise Linux (RHEL) 6.5
  • ksh-20120801-10.el6_5.6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content