[New-bugs-announce] [issue18427] str.replace causes segfault for long strings

Tobias Marschall report at bugs.python.org
Thu Jul 11 11:40:39 CEST 2013


New submission from Tobias Marschall:

Running the following two lines of code causes a segfault:

s = 'A' * 3142044943 
t = s.replace('\n','')

My setup:
Python 2.7.5 (default, Jul 11 2013, 11:17:50) 
[GCC 4.6.3] on linux2
Linux 3.2.0-45-generic #70-Ubuntu SMP Wed May 29 20:12:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I could reproduce this behavior on Python 2.6.8 and 2.5.6.

Please let me know if I can provide additional information.

----------
components: Interpreter Core
messages: 192855
nosy: tobiasmarschall
priority: normal
severity: normal
status: open
title: str.replace causes segfault for long strings
type: crash
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18427>
_______________________________________


More information about the New-bugs-announce mailing list