TCSH Segmentation Fault on certain .history in utf8 locale.

Originator:mjhsieh
Number:rdar://5701791 Date Originated:
Status:Closed Resolved:in 10.6
Product: Product Version:
Classification: Reproducible:
 
Summary:

Mac OS X 10.5.1's TCSH will have segmentation when using utf-8 locale and with .history file contains certain data or certain size. This normally has been considered to be Terminal.app problem because it looks like Terminal.app always refuse to open a new process for a new window.

Step to Reproduce:
The sample .history should be attached with the bug, but also available from the URL in the transcript:
[localhost:~] johndoe% bash
localhost:~ johndoe$ cd
localhost:~ johndoe$ mkdir backup.tcshtest
localhost:~ johndoe$ mv .history .login* .cshrc* .tcsh* backup.tcshtest/
localhost:~ johndoe$ curl http://mjhsieh.googlepages.com/history-crash -o .history
localhost:~ johndoe$ bash -c 'LANG=en_US.UTF-8 tcsh'
Segmentation fault
localhost:~ johndoe$ bash -c 'LANG=C tcsh'
[localhost:~] johndoe%
[localhost:~] johndoe% exit

Expected Results:
No segmentation fault

Actual Results:
Crash.

Regression:
it only occurs when: 1. in utf-8 locale 2. with certain .history file.

[localhost:~] johndoe% tcsh --version
tcsh 6.14.00 (Astron) 2005-03-25 (powerpc-apple-darwin) options wide,nls,dl,al,kan,sm,rh,color,filec
[localhost:~] johndoe% uname -a
Darwin localhost 9.1.0 Darwin Kernel Version 9.1.0: Wed Oct 31 17:48:21 PDT 2007; root:xnu-1228.0.2~1/RELEASE_PPC Power Macintosh

Notes:
This issue has been addressed in other OS, https://bugs.launchpad.net/ubuntu/+source/tcsh/+bug/86683 and the solution proposed is to upgrade the tcsh.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!