[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-11-08 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: I opened #4333 for 2.7, but it is quite straightforward.. Am i missing something? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-11-08 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +4288 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31764> ___ _

[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-10-21 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: ISTM that PR 3840 resolved this issue (as part of bpo-28280). -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3972 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31758> ___ _

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: According to Serhiy's advice (https://bugs.python.org/issue31455#msg304338), this issue now also includes some crashes in _elementtree: The following code crashes: import _elementtree parser = _elementtree.XMLParser._

[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3971 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: Various __init__() methods don't decref (if needed) before assigning to fields of the object's struct (i.e. assigning to `self->some_field`): - _asyncio_Task___init___impl() (in Modules/_asynciomodule.c) - _lzma_LZMADecompressor___in

[issue31781] crashes when calling methods of an uninitialized zipimport.zipimporter object

2017-10-13 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3962 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31781] crashes when calling methods of an uninitialized zipimport.zipimporter object

2017-10-13 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code crashes: import zipimport zi = zipimport.zipimporter.__new__(zipimport.zipimporter) zi.find_module('foo') This is because get_module_info() (in Modules/zipimport.c) assumes that the zipimporter object is initializ

[issue31779] assertion failures and a crash when using an uninitialized struct.Struct object

2017-10-13 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3960 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31779] assertion failures and a crash when using an uninitialized struct.Struct object

2017-10-13 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes an assertion failure: import _struct struct_obj = _struct.Struct.__new__(_struct.Struct) struct_obj.iter_unpack(b'foo') This is because Struct_iter_unpack() (in Modules/_struct.c) assumes that

[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-10-13 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Serhiy, in addition to the problems you mentioned with not calling __init__(), it seems that calling every method of an uninitialized XMLParser object would crash. If you don't mind, i would be happy to open an issue to fix these c

[issue31758] various refleaks in _elementtree

2017-10-13 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Shame on me. I only now found out that Serhiy already mentioned most of the refleaks in https://bugs.python.org/issue31455#msg302103. -- ___ Python tracker <rep...@bugs.python.or

[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-10-12 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3946 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-10-12 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code crashes: import sqlite3 import weakref def callback(*args): pass connection = sqlite3.connect(":memory:") cursor = sqlite3.Cursor(connection) ref = weakref.ref(cursor, callback) cursor.__init__(connection

[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3934 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes a crash: import sqlite3 cursor = sqlite3.Cursor.__new__(sqlite3.Cursor) cursor.close() this is because pysqlite_cursor_close() (in Modules/_sqlite/cursor.c) assumes that `self->connection` is not NULL, a

[issue31758] various refleaks in _elementtree

2017-10-11 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3931 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31758] various refleaks in _elementtree

2017-10-11 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code results in refleaks: import sys import _elementtree builder = _elementtree.TreeBuilder() parser = _elementtree.XMLParser(target=builder) refcount_before = sys.gettotalrefcount() parser.__init__(target=builder)

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-11 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3927 stage: resolved -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-10-11 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3926 stage: backport needed -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-11 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3925 stage: backport needed -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder

2017-10-10 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3918 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31740] refleaks when calling sqlite3.Connection.__init__() more than once

2017-10-10 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: (opened bpo-31746 for the crashes i mentioned) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31746] crashes in sqlite3.Connection in case it is uninitialized or partially initialized

2017-10-10 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes a crash: import sqlite3 connection = sqlite3.Connection.__new__(sqlite3.Connection) connection.isolation_level This is because pysqlite_connection_get_isolation_level() doesn't check whether the Connection

[issue31740] refleaks when calling sqlite3.Connection.__init__() more than once

2017-10-10 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3917 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-09 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: As serhiy pointed out in a comment in PR 3924, setting self->text or self->tail to NULL might lead to an assertion failure, so we should also prevent the following assertion failure (and the similar one for tail): import xml.etree

[issue31740] refleaks when calling sqlite3.Connection.__init__() more than once

2017-10-09 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Ah, here also there are crashes when calling methods of uninitialized connection objects. Should i fix this as part of this issue, or open another one? -- ___ Python tracker <rep...@bugs.p

[issue31740] refleaks when calling sqlite3.Connection.__init__() more than once

2017-10-09 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes refleaks: import sqlite3 connection = sqlite3.Connection.__new__(sqlite3.Connection) connection.__init__('foo') connection.__init__('foo') This is because pysqlite_connection_init() (in Modules/_sqlite/connec

[issue31734] crash or SystemError in sqlite3.Cache in case it is uninitialized or partially initialized

2017-10-09 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3912 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31723] refleaks in zipimport when calling zipimporter.__init__() more than once

2017-10-09 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Yes, i am going manually over the code to find similar stuff to #31718, and i afraid i found quite a few, and still working on it.. -- ___ Python tracker <rep...@bugs.python.or

[issue31734] crash or SystemError in sqlite3.Cache in case it is uninitialized or partially initialized

2017-10-09 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Also, the following code results in a memory leak: import sqlite3 cache = sqlite3.Cache.__new__(sqlite3.Cache) This is because pysqlite_cache_dealloc() just returns in case of an uninitialized Cache

[issue31734] crash or SystemError in sqlite3.Cache in case it is uninitialized or partially initialized

2017-10-09 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes a crash: import sqlite3 cache = sqlite3.Cache.__new__(sqlite3.Cache) cache.get(None) This is because pysqlite_cache_get() (in Modules/_sqlite/cache.c) assumes that the Cache object is initialized, and so it

[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-08 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3897 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-08 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes the interpreter to crash: import xml.etree.ElementTree class X: def __del__(self): elem.clear() elem = xml.etree.ElementTree.Element('elem') elem.text = X() elem.clear() This is b

[issue31723] refleaks in zipimport when calling zipimporter.__init__() more than once

2017-10-07 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3892 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31723] refleaks in zipimport when calling zipimporter.__init__() more than once

2017-10-07 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes refleaks: import zipimport zi = zipimport.zipimporter.__new__(zipimport.zipimporter) zi.__init__('bar.zip') zi.__init__('bar.zip') zi.__init__('bar.zip\\foo') This is because zipimport_zipimporter___init_

[issue31721] assertion failure in FutureObj_finalize() after setting _log_traceback to True

2017-10-07 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes an assertion failure in FutureObj_finalize() (in Modules/_asynciomodule.c): import asyncio asyncio.Future()._log_traceback = True Maybe we should allow Python code to only set it to False, and raise a Valu

[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-07 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: With regard to refleaks in __init__() methods, i started looking for similar refleaks in the codebase, and hope to open an issue to fix them soon. -- ___ Python tracker <rep...@bugs.p

[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-07 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3886 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Yes, although i don't know if there are usecases for that. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31718] some methods of uninitialized io.IncrementalNewlineDecoder objects raise SystemError

2017-10-06 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: Given an uninitialized IncrementalNewlineDecoder: uninitialized = io.IncrementalNewlineDecoder.__new__(io.IncrementalNewlineDecoder) each of the following calls would raise a SystemError ('null argument to internal r

[issue31165] null pointer deref and segfault in list_slice (listobject.c:455)

2017-10-06 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Oh, and calls to PyObject_GC_NewVar() might also cause similar issues. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31092] multiprocessing.Manager() race condition

2017-10-06 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Davin and Antoine, i added you to the nosy list because you are listed as multiprocessing experts :) -- nosy: +davin, pitrou ___ Python tracker <rep...@bugs.python.org> <https://

[issue31165] null pointer deref and segfault in list_slice (listobject.c:455)

2017-10-06 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Here is some similar code that crashes for the same reasons: # create a circular reference with a malicious __del__(). class A: def __del__(*args): del list1[0] circ_ref_obj = A() circ_ref_obj._self = circ_ref_obj list1 =

[issue31092] multiprocessing.Manager() race condition

2017-10-05 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Prof Plum, i changed the type of the issue to 'behavior', because Lang and me both got a KeyError. if your interpreter actually crashed, please change it back to 'crash'. -- ___ Python tracke

[issue31092] multiprocessing.Manager() race condition

2017-10-05 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: IIUC: In Lang's example, doing `queue = None` caused the destruction of the shared queue, which caused a call to BaseProxy._decref() (in multiprocessing/managers.py), which dispatched a decref request to the manager's server process. Mea

[issue31683] a stack overflow on windows in faulthandler._fatal_error()

2017-10-03 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: On my 64-bit Windows 10, the echo here would print -1073741571: python -c "import faulthandler; faulthandler._fatal_error(b'a' * 2 ** 22)" echo %errorlevel% This is code c0fd, which windbg describes as 'Stack overflo

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-10-03 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: I am not sure, but ISTM that it isn't possible for the encoder to return a unicode and not fail later. This is because _textiowrapper_writeflush() would call _io.BytesIO.write() (after it called _PyBytes_Join()), and bytesio_write()

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-10-02 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: sure -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31271> ___ __

[issue21983] segfault in ctypes.cast

2017-10-02 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- versions: +Python 2.7, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue21983] segfault in ctypes.cast

2017-10-02 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- versions: +Python 3.7 -Python 2.7, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue21983] segfault in ctypes.cast

2017-10-02 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3839 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue29832] Don't refer to getsockaddrarg in error messages

2017-10-02 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Should i remove the code that i wasn't able to test from the PR, and leave such changes to someone that is able to test it? (of course, if there is some way i can do it using a VM, please point that out, and i would try to set up t

[issue21983] segfault in ctypes.cast

2017-10-01 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: IMHO, Lib/ctypes/test/test_cast.py is the relevant test. Mark, do you still wish to provide a fix for that? (Otherwise, i would be happy to open a PR.) -- nosy: +Oren Milman ___ Python tracke

[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-10-01 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3826 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31478> ___ _

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3821 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: (for knowledge preservation's sake) Resolving this issue would also resolve #31486. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-29 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: I would be happy to write a PR that implements that. However, i am not sure which way is better to construct a list from the return value (an iterable, hopefully) of keys() etc.: - Call PyList_Type() (in each of PyMapping_Keys

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3808 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31285> ___ _

[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2017-09-29 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3807 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29843> ___ _

[issue31637] integer overflow in the size of a ctypes.Array

2017-09-29 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue31637] integer overflow in the size of a ctypes.Array

2017-09-29 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: oh, i missed that. sorry. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31637] integer overflow in the size of a ctypes.Array

2017-09-29 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code: from ctypes import * from _testcapi import PY_SSIZE_T_MAX, LONG_MAX if LONG_MAX == PY_SSIZE_T_MAX == (1 << 31) - 1: class MyArray(Array): _type_ = c_longlong _length_ = 1 << 29

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: But in case get_source() returned a unicode, is it likely that the splitlines() method of this unicode would return a 8-bit string? Currently show_warning() doesn't handle this scenario, as it assumes splitlines() returned an 8-bit

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-29 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: oh, of course, checking that get_source() returned a string before passing it to str.splitlines() is not needed. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Another thought - the existing code assumes that splitlines() returned a string. So maybe we could just check that get_source() returned a string, and then call the method str.spli

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: In 2.7, PyUnicode_Splitlines() first does: string = PyUnicode_FromObject(string); So i thought that PyUnicode_Splitlines() would be fine with receiving a string. But now i realize that even in case i was right there, PyUnicode_Spli

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3791 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31285> ___ _

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3789 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31285> ___ _

[issue28129] assertion failures in ctypes

2017-09-28 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Shouldn't we close this issue? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-28 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: With regard to backporting to 2.7: In 2.7 also, PyNumber_Absolute() is called, and its return value is stored in the variable n. However, there is no _PyLong_NumBits(n), so there is no assertion failure. If n isn't an i

[issue15988] Inconsistency in overflow error messages of integer argument

2017-09-28 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Serhiy, you suggested in https://bugs.python.org/issue15988#msg289799 that uploading diff files here is more convenient than in a github PR, so I uploaded my fixes here, and so https://github.com/python/cpython/pull/668 is now ou

[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: fixed indeed. thanks! :) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: thanks :) opened http://psf.upfronthosting.co.za/roundup/meta/issue642 -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31531] crash and SystemError in case of a bad zipimport._zip_directory_cache

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Yet another code that causes a SystemError: import zipimport importer = zipimport.zipimporter('foo.zip') tup_as_list = list(zipimport._zip_directory_cache['foo.zip']['foo\\__init__.py']) tup_as_list[0] = None zipimport._zip_directory

[issue6986] _json crash on scanner/encoder initialization error

2017-09-27 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- pull_requests: +3775 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue6986> ___ __

[issue6986] _json crash on scanner/encoder initialization error

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: I would be happy to open such a PR, if you don't mind. -- nosy: +Oren Milman ___ Python tracker <rep...@bugs.python.org> <https://bugs.pytho

[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2017-09-27 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3774 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2017-09-27 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes the interpreter to crash: import _collections class BadDeque(_collections.deque): def __new__(cls, *args): if len(args): return 42 return _collections.deque.__new__(cls) Ba

[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: Nick, maybe you tried to reproduce in release? In debug (where I got the SystemError), you have in the beginning of _PyFrame_New_NoTrack(): #ifdef Py_DEBUG if (code == NULL || globals == NULL || !PyDict_Check(globals) || (

[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- nosy: +ezio.melotti ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31605> ___ __

[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman
Oren Milman <ore...@gmail.com> added the comment: I am not 100% sure that issues are showed because they had a recent activity, but ISTM like the reason.. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: For example, when I search for 'ctypes', I get only two results. Just in case, i checked and got the same results in multiple browsers, and also on Ubuntu and on Windows. -- components: Demos and Tools messages: 303114 nosy

[issue31602] assertion failure in zipimporter.get_source() in case of a bad zlib.decompress()

2017-09-27 Thread Oren Milman
Change by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3769 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31602] assertion failure in zipimporter.get_source() in case of a bad zlib.decompress()

2017-09-27 Thread Oren Milman
New submission from Oren Milman <ore...@gmail.com>: The following code causes an assertion failure (in case there exists a compressed zip file named 'foo.zip' with a file called 'bar.py' in it): import zlib import zipimport def bad_decompress(*args): return None zlib.deco

[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-26 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3752 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-26 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure: import unicodedata def bad_normalize(*args): return None unicodedata.normalize = bad_normalize import ast ast.parse('\u03D5') This is because init_normalization() (in Python/ast.c) assumes

[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-26 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3749 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31586] SystemError in _collections._count_element() in case of a bad mapping argument

2017-09-26 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3748 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-26 Thread Oren Milman
New submission from Oren Milman: The following code causes a SystemError: class BadMetaclass(type): def __prepare__(*args): pass class Foo(metaclass=BadMetaclass): pass This is because builtin___build_class__() assumes that __prepare__() returned a mapping, and passes

[issue31586] SystemError in _collections._count_element() in case of a bad mapping argument

2017-09-26 Thread Oren Milman
New submission from Oren Milman: The following code causes a SystemError: class BadMapping: get = dict.get __setitem__ = dict.__setitem__ import _collections _collections._count_elements(BadMapping(), [42]) This is because _count_elements() (in Modules/_collectionsmodule.c) assumes

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3739 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
Oren Milman added the comment: I opened a PR. I think another fix might be to use PyLong_Type.tp_as_number->long_divmod() instead of PyNumber_Divmod(). -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.or

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: class BadInt: def __divmod__(*args): return 42 import os os.utime('foo.txt', ns=(BadInt(), 1)) This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes that PyNumber_Divmod

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: import os import time import resource new_pid = os.fork() if new_pid == 0: time.sleep(0.5) else: resource.struct_rusage = None os.wait3(0) We would get a crash also if we replaced 'os.wait3(0

[issue31573] struct_rusage

2017-09-25 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- nosy: Oren Milman priority: normal severity: normal status: open title: struct_rusage ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-09-25 Thread Oren Milman
Oren Milman added the comment: > But this is a separate issue, 3.7 only. I don't think i understand what this issue would include. Anyway, i updated the PR according to your comments. -- ___ Python tracker <rep...@bugs.python.org&g

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Oren Milman
Changes by Oren Milman <ore...@gmail.com>: -- keywords: +patch pull_requests: +3701 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure: __name__ = b'foo' __file__ = None import _warnings _warnings.warn('bar') This is because setup_context() (in Python/_warnings.c) assumes that __name__ is a string, and so it passes

  1   2   3   4   >