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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.