Bug 604725 - zsh crashes when command line argument contains Japanese characters in emacs shell mode,
zsh crashes when command line argument contains Japanese characters in emacs...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: zsh (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-16 11:18 EDT by masami256
Modified: 2011-06-08 20:00 EDT (History)
4 users (show)

See Also:
Fixed In Version: zsh-4.3.10-6.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-08 19:57:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
evidence of the bug. (2.27 KB, text/plain)
2010-06-16 11:18 EDT, masami256
no flags Details
backtrace (1.60 KB, text/plain)
2010-07-30 05:19 EDT, Daiki Ueno
no flags Details

  None (edit)
Description masami256 2010-06-16 11:18:51 EDT
Created attachment 424502 [details]
evidence of the bug.

Description of problem: 
When I execute a command that argument is written in Japanese in emacs shell mode, I got following message.
[masami@moon]~% ls ダウンロード
ls *** glibc detected *** /bin/zsh: double free or corruption (!prev): 0x00000000025e2c10 ***
*** glibc detected *** /bin/zsh: malloc(): memory corruption: 0x00000000025e2cc0 ***

I tested "ls", "cat", "cp" and "touch" commands and they got an error.

My default login shell is /bin/zsh, if I start emacs following command line, I didn't see the bug.
[masami@moon]~% SHELL=/bin/bash emacs

Only if I use zsh, I got the error. also, if I use LANG=C when start emacs, I didn't get it. actually, emacs shell mode can't handle Japanese character, anyway.

However, if I gave one Japanese character, zsh didn't crash but if I gave five Japanese character zsh crashed.
[masami@moon]~% touch あ
touch あ
[masami@moon]~% touch あいうえお
touch あ*** glibc detected *** /bin/zsh: free(): invalid next size (normal): 0x0000000001d2baa0 ***
*** glibc detected *** /bin/zsh: malloc(): memory corruption: 0x0000000001d2bb70 ***

Please let me know, if I can help debugging the problem.
thanks,

Version-Release number of selected component (if applicable):
zsh-4.3.10-5.fc13.x86_64
emacs-nox-23.2-1.fc13.x86_64

How reproducible:

Steps to Reproduce:
1.Set default LANG as ja_JP.utf8

2.Set default SHELL as /bin/zsh

3.Create a file which name is written by Japanese.

4.Rename your ~/.emacs to ~/dot_emacs or something else to emacs doesn't read your config.

5.Run emacs without any options.

6.Start emacs shell mode(M-x shell)

7.Excute "ls" command with file name which was created at step3.

Actual results:
Got that message:
*** glibc detected *** /bin/zsh: double free or corruption (!prev): 0x00000000025e2c10 ***
*** glibc detected *** /bin/zsh: malloc(): memory corruption: 0x00000000025e2cc0 ***

Expected results:
Any command should be success.

Additional info:
Comment 1 Daiki Ueno 2010-07-30 05:18:56 EDT
Here is another steps to reproduce:

On gnome-terminal, do:

 LANG=ja_JP.utf8 TERM=dumb zsh -f

Enable a Japanese input method (e.g. ibus & ibus-anthy)

Type 'あ' (= 'a') and commit (= Return).

I'm attaching a backtrace.
Comment 2 Daiki Ueno 2010-07-30 05:19:41 EDT
Created attachment 435506 [details]
backtrace
Comment 3 Daiki Ueno 2010-08-02 00:34:01 EDT
I posted a patch for this:
http://permalink.gmane.org/gmane.comp.shells.zsh.devel/20747
Comment 4 Daiki Ueno 2010-12-20 12:25:05 EST
FYI, zsh 4.3.11 including the fix has just been released.
Comment 5 Akira TAGOH 2011-05-24 08:54:13 EDT
Thanks for tracking. is there any chance to push updates for f13 and f14?
Comment 6 James Antill 2011-05-24 13:51:53 EDT
Akira, if you want to co-maintain zsh ... I'm happy to let you backport this.
Comment 7 Akira TAGOH 2011-05-25 23:07:03 EDT
Okay, I'll work on it then. thanks for offering!
Comment 8 Fedora Update System 2011-05-30 04:49:02 EDT
zsh-4.3.10-6.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/zsh-4.3.10-6.fc13
Comment 9 Fedora Update System 2011-05-30 04:49:51 EDT
zsh-4.3.10-6.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/zsh-4.3.10-6.fc14
Comment 10 Fedora Update System 2011-05-30 18:30:47 EDT
Package zsh-4.3.10-6.fc13:
* should fix your issue,
* was pushed to the Fedora 13 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zsh-4.3.10-6.fc13'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/zsh-4.3.10-6.fc13
then log in and leave karma (feedback).
Comment 11 Bug Zapper 2011-06-02 06:36:40 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Fedora Update System 2011-06-08 19:57:32 EDT
zsh-4.3.10-6.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2011-06-08 20:00:37 EDT
zsh-4.3.10-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.