[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, on Unix you can restrict the address space of a program to > test the issue without almost crashing and OOMing your box. ;) Ah, thanks, but I didn't crash and OOM it, since it has no swap: memory errors get raised quickly here :) -- ___

[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I wonder why I don't see a memory error in Python 3.3 or earlier. Any idea? See issue #15958. Now join() accept arbitrary buffer objects, which can be modified during iteration, and therefore need a temporary list of Py_buffers. -- nosy: +serhiy.st

[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-01 Thread Christian Heimes
Christian Heimes added the comment: Antoine, on Unix you can restrict the address space of a program to test the issue without almost crashing and OOMing your box. ;) >>> import resource >>> resource.setrlimit(resource.RLIMIT_AS, (1024*1024*100, 1024*1024*100)) >>> l = [b''] * (100*1024*70) >>>

[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9af5a2611202 by Christian Heimes in branch 'default': Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation failure http://hg.python.org/cpython/rev/9af5a2611202 -- nosy: +python-dev ___

[issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure

2012-12-01 Thread Antoine Pitrou
New submission from Antoine Pitrou: >>> l = [b''] * (100*1024*1024) [104918914 refs] >>> d = b''.join(l) Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set (you'll have to adjust the list size based on your system memory size) -- co