This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexis.d
Recipients alexis.d
Date 2014-02-04.18:48:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za>
In-reply-to
Content
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'
>>>>
History
Date User Action Args
2014-02-04 18:48:23alexis.dsetrecipients: + alexis.d
2014-02-04 18:48:23alexis.dsetmessageid: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za>
2014-02-04 18:48:23alexis.dlinkissue20512 messages
2014-02-04 18:48:23alexis.dcreate