[New-bugs-announce] [issue16228] JSON crashes during encoding resized lists

Serhiy Storchaka report at bugs.python.org
Sun Oct 14 11:56:18 CEST 2012


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 <report at bugs.python.org>
<http://bugs.python.org/issue16228>
_______________________________________


More information about the New-bugs-announce mailing list