문제:
macport로 python36을 설치하고, 안내에 따라 py36-readline을 설치했는데 아래 처럼 crash가 났다.
$ python
Python 3.6.1 (default, Mar 22 2017, 15:53:21)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ''.join(sorted('azbasdfasdf'))
Python(4369,0x7fffa0cba3c0) malloc: *** error for object 0x10592a4f0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
해결:
$ sudo port uninstall py36-readline
$ sudo port install python36 +readline
python36 package를 설치하고 나면 py36-readline도 꼭 설치하라는 식의 메시지가 나오는데 이거 잘못된 것인 듯
ref: https://trac.macports.org/ticket/53360
happy hackin'