[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Ok. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I have python built with Py_DEBUG (./configure --with-pydebug) > What I' missed? > I'm ok with status quo but just want to understand how to configure my build > properly. Well, I don't know. Perhaps a different compiler version, a different libc, or perhaps

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have python built with Py_DEBUG (./configure --with-pydebug) What I' missed? I'm ok with status quo but just want to understand how to configure my build properly. -- ___ Python tracker

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As I said tests was not crashed on my linux 64 bit Ubuntu with buggy code. They crashed duly here in debug mode (64-bit Linux). -- ___ Python tracker ___

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: As I said tests was not crashed on my linux 64 bit Ubuntu with buggy code. -- ___ Python tracker ___ ___

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hi, I'm ok with patch but I guess to add some comment in C code to > prevent, hmm, back optimization from upcoming contributor. > The same for #16230 But that's what tests are for. -- ___ Python tracker

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: Hi, I'm ok with patch but I guess to add some comment in C code to prevent, hmm, back optimization from upcoming contributor. The same for #16230 -- ___ Python tracker __

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for noticing this, and for writing a patch. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker _

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33ae62a4ecf5 by Antoine Pitrou in branch '2.7': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/33ae62a4ecf5 -- ___ Pyth

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3672db224eb3 by Antoine Pitrou in branch '3.2': Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded. http://hg.python.org/cpython/rev/3672db224eb3 New changeset 7528c02b8d52 by Antoine Pitrou in branch '

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Of course, this kind of bugs can cause unpredictable behavior, they do not have to lead to an immediate crash. This depends from the platform, the compiler and its options. On my computers the test always crashed, this is the maximum that I can say. -

[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: The patch LGTM except I cannot reproduce crash on unmodified sources with running applied test. -- nosy: +asvetlov ___ Python tracker ___ _

[issue16228] JSON crashes during encoding resized lists

2012-10-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue16228] JSON crashes during encoding resized lists

2012-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue16228] JSON crashes during encoding resized lists

2012-10-14 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16228] JSON crashes during encoding resized lists

2012-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file27563/json_encode_resized_list.patch ___ Python tracker ___ __

[issue16228] JSON crashes during encoding resized lists

2012-10-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: JSON encoding crash if the source list resized in process of encoding. This can be happen unintentionally in multithreaded code. Simple crash code: import json a = [object()] * 10 def crasher(obj): del a[-1] json.dumps(a, default=crasher) --