*Synopsis*: ksh93 gets SIGSEGV if HISTFILE is changed in place.
CR 6834184 changed on Oct 23 2009 by <User 1-7MTUEB>
=== Field ============ === New Value ============= === Old Value =============
Commit to Fix in Build snv_127
Status 7-Fix in Progress 6-Fix Understood
====================== =========================== ===========================
*Change Request ID*: 6834184
*Synopsis*: ksh93 gets SIGSEGV if HISTFILE is changed in place.
Product: solaris
Category: shell
Subcategory: korn93
Type: Defect
Subtype:
Status: 7-Fix in Progress
Substatus:
Priority: 3-Medium
Introduced In Release: solaris_nevada
Introduced In Build: snv_72
Responsible Engineer: <User 1-7MTUEB>
Keywords: opensolaris, oss-request, oss-sponsor
=== *Description* ============================================================
Category
solaris/shell (Solaris Utilities/Commands)
Sub-Category
korn93
Description
Running ksh93 in snv_111 (actually the Indiana build 111 bits, not 111a).
gw:~> ksh93
<email address omitted>:~$ ls -l .tramp_history
.tramp_history: No such file or directory
<email address omitted>:~$ HISTFILE=/export/home/richlowe/.tramp_history
zsh: segmentation fault (core dumped) ksh93
gw:~> pstack core
core 'core' of 1620: ksh93
d1274574 strcmp (80674ae, 0, 8047000, d1199292) + ec
d11992f3 put_history (80689b4, 80674ae, 0, 8069138) + 6f
d11b9bd0 nv_putv (80689b4, 80674ae, 0, 8069138) + e0
d11b5a41 nv_putval (80689b4, 80674ae, 0, 8047150) + a5
d11b5845 nv_open (80674a5, 8068f38, 20200, d11b2cfd) + 869
d11b39d1 nv_setlist (806749c, 20200, 80674d4, 0) + ce5
d11d6993 sh_exec (80674d4, 4, 0, d11b1b4d) + 2747
d11b1cf6 exfile (d1206d68, d10ef0d0) + 716
d11b154c sh_main (1, 8047b50, 0, d1270f32, 4, 0) + 808
08050bd6 main (1, 8047b50, 8047b58, 8047b0c) + 4a
08050afd _start (1, 8047c28, 0, 8061218, 8061238, 8061258) + 7d
(note the 2nd arg to strcmp)
However, if HISTFILE is unset first, all is fine:
gw:~> ksh93
<email address omitted>:~$ unset HISTFILE
<email address omitted>:~$ HISTFILE=/export/home/richlowe/.tramp_history
<email address omitted>:~$
Frequency
Always
Regression
No
Steps to Reproduce
Alter HISTFILE without first unsetting it (it maybe important that the file
does not currently exist?)
Expected Result
HISTFILE appropriately changed, all is well.
Actual Result
SIGSEGV strcmp'ing a second arg of NULL
Error Message(s)
Test Case
Workaround
unset HISTFILE before altering it.
Additional configuration information
*** (#1 of 3): 2009-04-25 01:45:30 GMT+00:00 <User 1-F4SZV>
I've attached a core file from Rich to the bug report.
*** (#2 of 3): 2009-04-25 07:39:28 GMT+00:00 <User 1-5Q-13979>
This can be easily reproduced by simply typing
$ env - ksh93
myprompt$ HISTFILE=/tmp/somefile
*** (#3 of 3): 2009-04-25 07:43:01 GMT+00:00 <User 1-5Q-13979>
=== *Public Comments* ========================================================
I was also able to reproduce this, and further testing with Rich noted
that it only applies when HISTFILE is in its default unset state, and
that changing HISTFILE in .profile appears to make you immune.
*** (#1 of 1): 2009-04-25 05:03:50 GMT+00:00 <User 1-5Q-1267>
=== *Workaround* =============================================================
Set HISTFILE in $HOME/.profile.
*** (#1 of 2): 2009-04-25 05:03:50 GMT+00:00 <User 1-5Q-1267>
Another workaround is to "unset HISTFILE" before setting it. This works even
if HISTFILE isn't already set.
*** (#2 of 2): 2009-04-25 07:39:29 GMT+00:00 <User 1-5Q-13979>
=== *Additional Details* =====================================================
Targeted Release: solaris_nevada
Commit To Fix In Build: snv_127
Fixed In Build:
Integrated In Build:
Verified In Build:
See Also: 6793763, 6831077, 6834207
Duplicate of:
Hooks:
Hook1:
Hook2:
Hook3:
Hook4:
Hook5: <email address omitted>
Hook6: <email address omitted>
Program Management:
Root Cause: Insufficient Testing
Fix Affects Documentation: No
Fix Affects Localization: No
=== *History* ================================================================
Date Submitted: 2009-04-25 01:45:29 GMT+00:00
Submitted By: <User 1-F4SZV>
Status Changed Date Updated Updated By
6-Fix Understood 2009-06-17 12:47:16 GMT+00:00 <User 1-1SURPB>
7-Fix in Progress 2009-10-23 18:26:58 GMT+00:00 <User 1-7MTUEB>
=== *Service Request* ========================================================
Impact: Significant
Functionality: Nonessential
Severity: 4
Product Name: solaris
Product Release: solaris_nevada
Product Build: snv_111
Operating System: solaris_nevada
Hardware: generic
Submitted Date: 2009-04-25 01:45:30 GMT+00:00
=== *Multiple Release (MR) Cluster* - 0 ======================================