Created
July 30, 2016 17:00
-
-
Save kootenpv/5e86cd2f38220f6bccadfc175e475da1 to your computer and use it in GitHub Desktop.
malloc: *** error in re for Python 3.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def fn(): | |
scanner = re.Scanner([ | |
(r'([0-9]{2}):([0-9]{2}):([0-9]{2})', lambda y, x: x), | |
(r'.', lambda y, x: x) | |
]) | |
return scanner.scan("10:10:10") | |
# This works on Python 2.7, but not on Python 3.5 | |
for i in range(10): | |
print(fn()) | |
# Error: Python(87764,0x7fff72029000) malloc: *** error for object 0x10331d4e8: incorrect checksum for freed object - object was probably modified after being freed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment