*Synopsis*: ksh93 SEGVs on array reinitialization
CR 6715496 changed on Jun 19 2008 by <User 1-5Q-5151>
=== Field ============ === New Value ============= === Old Value =============
Evaluation New Note
Introduced in Build snv_72
Introduced in Release solaris_nevada
Status 3-Accepted 1-Dispatched
Status 6-Fix Understood 3-Accepted
====================== =========================== ===========================
*Change Request ID*: 6715496
*Synopsis*: ksh93 SEGVs on array reinitialization
Product: solaris
Category: shell
Subcategory: korn93
Type: Defect
Subtype:
Status: 6-Fix Understood
Substatus:
Priority: 2-High
Introduced In Release: solaris_nevada
Introduced In Build: snv_72
Responsible Engineer:
Keywords:
=== *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>
=== *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:
Commit To Fix In Build:
Fixed In Build:
Integrated In Build:
Verified In Build:
See Also:
Duplicate of:
Hooks:
Hook1:
Hook2:
Hook3:
Hook4:
Hook5:
Hook6:
Program Management:
Root Cause:
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>
=== *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 ======================================