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.

classification
Title: segmentation fault using a dict as a key
Type: crash Stage: resolved
Components: macOS Versions: Python 3.3, Python 2.7
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: ronaldoussoren Nosy List: mmerickel, ned.deily, ronaldoussoren, tim.peters
Priority: normal Keywords:

Created on 2013-11-07 02:30 by mmerickel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg202303 - (view) Author: Michael Merickel (mmerickel) Date: 2013-11-07 02:30
I assume there is some incompatibility in the maverick's C runtime, but getting a segfault only on the python binaries from python.org.

Version shipped by Apple OS X 10.9 Mavericks:

~❯ python2.7
Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> foo = {}
>>> foo[{}] = 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'dict'
>>>

2.7 binary installed from python.org:

~❯ /Library/Frameworks/Python.framework/Versions/2.7/bin/python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> foo = {}
>>> foo[{}] = 1
[1]    4517 segmentation fault  /Library/Frameworks/Python.framework/Versions/2.7/bin/python

3.3 binary installed from python.org:

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.
>>> foo = {}
>>> foo[{}] = 1
[1]    1898 segmentation fault  python
msg202304 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2013-11-07 03:48
Sure looks like the bug where virtually _any_ two lines entered in the shell cause a segfault.
msg202305 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2013-11-07 03:49
Betting this is a duplicate of:

http://bugs.python.org/issue18458
msg202306 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-07 03:51
It is a duplicate.  Fixed in 3.3.3 and 2.7.6.
msg202307 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-07 03:52
P.S. See that issue for a workaround.  Also release candidate installers for 3.3.3 and 2.7.6 are now available with final releases very soon.
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63715
2013-11-07 03:52:35ned.deilysetmessages: + msg202307
2013-11-07 03:51:08ned.deilysetstatus: open -> closed
superseder: interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update
messages: + msg202306

resolution: duplicate
stage: resolved
2013-11-07 03:49:40tim.peterssetmessages: + msg202305
2013-11-07 03:48:44tim.peterssetnosy: + tim.peters
messages: + msg202304
2013-11-07 03:47:17pjenveysetnosy: + ned.deily
2013-11-07 02:30:54mmerickelcreate