*Synopsis*: *ksh93* SEGVs on array reinitialization

CR 6715496 changed on Dec 22 2008 by <User 1-5Q-5151>

=== Field ============ === New Value ============= === Old Value =============

Commit to Fix in Build snv_106                                                
Status                 7-Fix in Progress           6-Fix Understood           
====================== =========================== ===========================

     
*Change Request ID*: 6715496

*Synopsis*: *ksh93* SEGVs on array reinitialization

  Product: solaris
  Category: shell
  Subcategory: korn93
  Type: Defect
  Subtype: 
  Status: 7-Fix in Progress
  Substatus: 
  Priority: 2-High
  Introduced In Release: solaris_nevada
  Introduced In Build: snv_72
  Responsible Engineer: <User 1-5Q-5151>
  Keywords: no-s10, oss-request, oss-sponsor

=== *Description* ============================================================
ksh93 dumps core when an array variable previously declared with "set -A vname" 
is reinitialized
by redeclaring it using "set -A vname".  

By reinitializing, we mean throwing away all array data that has been assigned 
so far and 
recreating the array as a freshly created 'set -A' variable would -- with no 
initial data
until specifically assigned.

Attached are a script that reproduces the bug and a core file produced when the 
script was run.

*** (#1 of 1): 2008-06-17 13:57:39 GMT+00:00 <User 1-5Q-8946>


=== *Public Comments* ========================================================

=== *Workaround* =============================================================
Instead of using simply 'set -A vname' to reinitialize the array, use
        set -A vname -- ""
This creates an array of size 1.

Do note that this is NOT exactly identical to "set -A vname" which 
creates an array of ZERO size (i.e., ${vname[*]} returns 0).

*** (#1 of 3): 2008-06-17 13:57:39 GMT+00:00 <User 1-5Q-8946>

AFAIK it should be possible to do an $ unset arrayname # before the $ set -A 
arrayname # to work around this problem, too.

*** (#2 of 3): 2008-06-17 20:09:48 GMT+00:00 <User 1-6Y4MMS>

Workaround #2 does not appear to be useful.

Please see the attached script (coreme.ksh) provided for reproduction
of the SEGV; coreme.ksh already calls 'unset arrayname' prior to 
re-invoking 'set -A arrayname'.

*** (#3 of 3): 2008-06-17 20:22:23 GMT+00:00 <User 1-5Q-8946>


=== *Additional Details* =====================================================
        Targeted Release: solaris_nevada
        Commit To Fix In Build: snv_106
        Fixed In Build: 
        Integrated In Build: 
        Verified In Build: 
  See Also: 6619428
  Duplicate of: 
  Hooks:
        Hook1: 
        Hook2: 
        Hook3: no-NAS
        Hook4: 
        Hook5: <email address omitted>
        Hook6: <email address omitted>
  Program Management: 
  Root Cause: New Code Introduced
  Fix Affects Documentation: No
  Fix Affects Localization: No

=== *History* ================================================================
        Date Submitted: 2008-06-17 13:57:39 GMT+00:00
        Submitted By: <User 1-5Q-8946>

        Status Changed    Date Updated                  Updated By
        3-Accepted        2008-06-19 00:02:04 GMT+00:00 <User 1-5Q-5151>
        6-Fix Understood  2008-06-19 00:02:34 GMT+00:00 <User 1-5Q-5151>
        7-Fix in Progress 2008-12-22 07:17:26 GMT+00:00 <User 1-5Q-5151>


=== *Service Request* ========================================================
        Impact: Critical
        Functionality: Primary
        Severity: 1
        Product Name: solaris
        Product Release: solaris_nevada
        Product Build: snv_91
        Operating System: snv_91
        Hardware: generic
        Submitted Date: 2008-06-17 13:57:39 GMT+00:00


=== *Multiple Release (MR) Cluster* - 0 ======================================


Reply via email to