[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '3.3':
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/7528c02b8d52

New changeset ab65509b8443 by Antoine Pitrou in branch 'default':
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/ab65509b8443

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 you got (un)lucky.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16228] JSON crashes during encoding resized lists

2012-11-01 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Ok. Thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16228] JSON crashes during encoding resized lists

2012-10-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16228] JSON crashes during encoding resized lists

2012-10-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +needs review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)

--
components: Extension Modules
messages: 172867
nosy: bob.ippolito, ezio.melotti, pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: JSON crashes during encoding resized lists
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16228] JSON crashes during encoding resized lists

2012-10-14 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16228
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com