classification
Title: Python3.3 segfaults when using big5hkscs encoding
Type: crash Stage: resolved
Components: Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update
View: 18458
Assigned To: Nosy List: alexis.d, loewis, ned.deily, r.david.murray, vstinner, yselivanov
Priority: normal Keywords:

Created on 2014-02-04 18:48 by alexis.d, last changed 2014-02-04 21:51 by ned.deily. This issue is now closed.

Messages (6)
msg210258 - (view) Author: Alexis Daboville (alexis.d) * Date: 2014-02-04 18:48
When using the 'big5hkscs' encoding it's possible to make Python3.3 segfault, here is how to repro:

 ✗ 13:41 adaboville @ adoboville-mbp in ~ $ py3
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 'nb'.encode('big5hkscs')
b'nb'
>>> 'nb'.encode('big5hkscs')
Segmentation fault: 11

Note that it doesn't crash on the first first line, but on the second (even though both lines are the same). FWIW pypy3.3 doesn't crash:

 ✓ 13:43 adaboville @ adoboville-mbp in .../pypy3-2.1-beta1-osx64 $ bin/pypy
Python 3.2.3 (d63636b30cc0, Jul 30 2013, 07:02:48)
[PyPy 2.1.0-beta1 with GCC 4.2.1 Compatible Clang Compiler] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``why did you guys have to make the
builtin fortune more interesting than actual work? i just catched myself
restarting pypy 20 times''
>>>> 'nb'.encode('big5hkscs')
b'nb'
>>>> 'nb'.encode('big5hkscs')
b'nb'
>>>>
msg210260 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2014-02-04 19:06
Can't reproduce this on 3.3.3

Python 3.3.3 (default, Dec  2 2013, 01:40:21)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
msg210261 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-02-04 19:19
Alexis: are you on 10.9, by any chance?
msg210262 - (view) Author: Alexis Daboville (alexis.d) * Date: 2014-02-04 19:42
@David: yes, 10.9.
msg210263 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-02-04 20:46
Most likely, then, this is a duplicate of issue 18458.
msg210271 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-02-04 21:51
This is definitely a duplicate of Issue18458 since the build signature indicates you are using 3.3.2 from the python.org OS X binary installer.  The problem is fixed in the current Python 3.3.3 installer.
History
Date User Action Args
2014-02-04 21:51:03ned.deilysetstatus: open -> closed

superseder: interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

nosy: + ned.deily
messages: + msg210271
resolution: duplicate
stage: resolved
2014-02-04 20:46:28r.david.murraysetmessages: + msg210263
2014-02-04 19:42:12alexis.dsetmessages: + msg210262
2014-02-04 19:19:03r.david.murraysetnosy: + r.david.murray
messages: + msg210261
2014-02-04 19:06:52yselivanovsetnosy: + yselivanov
messages: + msg210260
2014-02-04 19:05:16yselivanovsetnosy: + loewis, vstinner
2014-02-04 18:48:23alexis.dcreate