Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'broken': 0.04; 'widely': 0.05; 'elements.': 0.07; 'suppose': 0.07; 'arrays': 0.09; 'overflow': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'yeah,': 0.09; 'python': 0.11; 'bug': 0.12; '"community".': 0.16; 'galaxy': 0.16; 'lengths': 0.16; 'margin': 0.16; 'phones.': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'roy': 0.16; 'so.': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'stack': 0.19; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'pointer': 0.24; 'guys': 0.24; 'mention': 0.26; 'header:X -Complaints-To:1': 0.27; 'originally': 0.30; "i'm": 0.30; 'code': 0.31; 'piece': 0.31; 'bugs': 0.33; 'next': 0.36; 'url:eu': 0.37; 'being': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'most': 0.60; 'devices': 0.61; 'you.': 0.62; 'developed': 0.63; 'happen': 0.63; 'more': 0.64; 'forward': 0.65; 'due': 0.66; 'smith': 0.68; 'bow': 0.84; 'comparable': 0.84; 'samsung': 0.84; 'dealt': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: Bug in timsort!? Date: Wed, 25 Feb 2015 17:04:10 +0100 Organization: None References: <1cf84559-3a63-4799-a879-ae8e513d387e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd95a7.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424880264 news.xs4all.nl 2859 [2001:888:2000:d::a6]:38244 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86412 Sturla Molden wrote: > On 24/02/15 22:34, Roy Smith wrote: >> http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ >> > > This is awful. It is broken for arrays longer than 2**49 elements. With > 8 bytes per PyObject* pointer this is >4096 terabytes of RAM. I don't > see how we can fix this in time. > > Oh yes, and they mention that TimSort is used on billions of devices due > to Android mobile phones. This is clearly very relevant for mobile > phones. Next thing you know your litte Samsung Galaxy with more than > 4096 terabytes breaks down from a stack overflow in TimSort. Yeah, I'm looking forward to see comparable bugs being closed as "cannot reproduce" by some of the jokers. I suppose that you all had a note scribbled on the margin of your copy of Arithmetica that this cannot happen with arrays of lengths seen in practice until 2038 or so. These guys found a bug that is subtler than what most of us have dealt with in a widely used piece of code originally developed by one of the smarter members of the python "community". I bow my head to them and say thank you.