Bug 743837

Summary: ksh segfaults on oop code
Product: [Fedora] Fedora Reporter: Miroslav Franc <mfranc>
Component: kshAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: mhlavink, ohudlick
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ksh-20110630-7.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 743840 (view as bug list) Environment:
Last Closed: 2012-03-08 21:22:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 743840, 972732    

Description Miroslav Franc 2011-10-06 09:35:08 UTC
Description of problem:
ssia

Version-Release number of selected component (if applicable):
ksh-20110630-3.fc15.x86_64 # Fedora 15
ksh-20100621-10.el6.x86_64 # RHEL6

How reproducible:
always

Steps to Reproduce:
1. put the following code in the file and run it with ksh
---
typeset -T Something_t=(
   typeset -liSh 'number of objects' count=0
   typeset -lih 'some value' value=0

    create() {
        (( _.count++))
    }
)

.sh.type.Something_t=(value=42)
Something_t n1=()
Something_t n2=n1
---
  
Actual results:
segfault

Expected results:
no segfault

Additional info:
# haven't tried it on i386
# backtrace from fedora version ksh-20110630-3.fc15.x86_64
Program terminated with signal 11, Segmentation fault.
#0  0x000000000040a06e in putdisc (fp=<optimized out>, np=<optimized out>, val=<optimized out>, flag=<optimized out>) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvdisc.c:605
605                             if((mp=vp->bltins[i]) && !nv_isattr(mp,NV_NOFREE))
(gdb) bt
#0  0x000000000040a06e in putdisc (fp=<optimized out>, np=<optimized out>, val=<optimized out>, flag=<optimized out>) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvdisc.c:605
#1  putdisc (np=0x283dd10, val=<optimized out>, flag=<optimized out>, fp=0x283dd90) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvdisc.c:595
#2  0x000000000043d413 in _nv_unset (np=0x283dd10, flags=8193) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/name.c:2491
#3  0x000000000040c5ba in put_type (np=0x283dd10, val=0x283dd60 "n1", flag=8193, fp=0x283de10) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvtype.c:556
#4  0x0000000000443c47 in put_tree (np=0x283dd10, val=0x283dd60 "n1", flags=1, fp=0x283ddd0) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvtree.c:1133
#5  0x000000000040a00e in putdisc (np=0x283dd10, val=0x283dd60 "n1", flag=1, fp=0x283dd90) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvdisc.c:597
#6  0x000000000043b154 in nv_putval (np=0x283dd10, string=0x283dd60 "n1", flags=1) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/name.c:1572
#7  0x000000000040fa72 in nv_settype (np=0x283dd10, tp=<optimized out>, flags=<optimized out>) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/nvtype.c:1395
#8  0x0000000000473da4 in b_common (argv=0x282f1b8, flag=512, troot=0x282c6a0, tp=0x7ffff8632fc0) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/bltins/typeset.c:705
#9  0x000000000047579f in b_typeset (argc=2, argv=0x282f1b0, extra=<optimized out>) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/bltins/typeset.c:448
#10 0x000000000045d441 in sh_exec (t=0x282f110, flags=5) at /usr/src/debug/ksh-20110630/src/cmd/ksh93/sh/xec.c:1287
#11 0x0000000000408838 in exfile ()
#12 0x0000000000407c77 in sh_main ()
#13 0x0000003bdf82139d in __libc_start_main (main=0x406ec0 <main>, argc=2, ubp_av=0x7ffff86338c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7ffff86338b8) at libc-start.c:226
#14 0x0000000000406ef1 in _start ()

Comment 1 Fedora Update System 2012-02-23 12:02:06 UTC
ksh-20110630-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/ksh-20110630-7.fc16

Comment 2 Fedora Update System 2012-02-23 12:02:16 UTC
ksh-20110630-7.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/ksh-20110630-7.fc15

Comment 3 Fedora Update System 2012-02-25 08:29:44 UTC
Package ksh-20110630-7.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ksh-20110630-7.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2381/ksh-20110630-7.fc16
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-03-08 21:22:24 UTC
ksh-20110630-7.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2012-03-08 21:22:58 UTC
ksh-20110630-7.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.