[issue34471] _datetime: Missing NULL check in tzinfo_from_isoformat_results()

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8345 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34471> ___ ___ Py

[issue34474] Python/bltinmodule.c: Missing NULL check in builtin_sum_impl()

2018-08-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of PyFloat_FromDouble() at https://github.com/python/cpython/blob/48ce4897f8f8d91d948ecd1241ffab002df2be9e/Python/bltinmodule.c#L2403 is not checked for NULL and then dereferenced. Reported by Svace static analyzer. A similar issue in

[issue34474] Python/bltinmodule.c: Missing NULL check in builtin_sum_impl()

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8350 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34474> ___ ___ Py

[issue34477] Objects/typeobject.c: Missing NULL check in type_init()

2018-08-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of PyTuple_GetSlice() at https://github.com/python/cpython/blob/48ce4897f8f8d91d948ecd1241ffab002df2be9e/Objects/typeobject.c#L2297 is not checked for NULL and then dereferenced. Reported by Svace static analyzer. Currently

[issue34477] Objects/typeobject.c: Missing NULL check in type_init()

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8351 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34477> ___ ___ Py

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : This is a follow-up of #34454. 'datetime' extension module attempts to encode input strings into UTF-8 in several places, which requires special care because some valid Python strings can't be represented in UTF-8. It makes sense to add

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The C datetime implementation uses PyUnicode_AsUTF8AndSize() in wrap_strftime() and rejects strings containing surrogate code points (0xD800 - 0xDFFF) since they can't be encoded in UTF-8. On the other hand, the pure-Python datetime implement

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8353 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34482> ___ ___ Py

[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +8354 ___ Python tracker <https://bugs.python.org/issue34454> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +8355 ___ Python tracker <https://bugs.python.org/issue34482> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34468] An always-false condition in range_repr() from Objects/rangeobject.c

2018-08-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8357 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34468> ___ ___ Py

[issue34468] An always-false condition in range_repr() from Objects/rangeobject.c

2018-08-23 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you, Brett, I've submitted a PR. -- ___ Python tracker <https://bugs.python.org/issue34468> ___ ___ Python-bugs-l

[issue34492] Python/coreconfig.c: Missing NULL check in _Py_wstrlist_copy()

2018-08-24 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of PyMem_RawMalloc() is not checked for NULL at https://github.com/python/cpython/blob/ef8861c112ed1dac9351958c121bc24ca4ecdb08/Python/coreconfig.c#L71. Reported by Svace static analyzer. -- components: Interpreter Core messages

[issue34492] Python/coreconfig.c: Missing NULL check in _Py_wstrlist_copy()

2018-08-24 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8382 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34492> ___ ___ Py

[issue34493] Objects/genobject.c: Missing NULL check in compute_cr_origin()

2018-08-24 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of PyTuple_New() is not checked for NULL at https://github.com/python/cpython/blob/ef8861c112ed1dac9351958c121bc24ca4ecdb08/Objects/genobject.c#L1130 and then dereferenced. -- components: Interpreter Core messages: 324022 nosy

[issue34493] Objects/genobject.c: Missing NULL check in compute_cr_origin()

2018-08-24 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8383 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34493> ___ ___ Py

[issue34492] Python/coreconfig.c: Missing NULL check in _Py_wstrlist_copy()

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +8395 ___ Python tracker <https://bugs.python.org/issue34492> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34492] Python/coreconfig.c: Missing NULL check in _Py_wstrlist_copy()

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue34492> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34492] Python/coreconfig.c: Fix _Py_wstrlist_copy()

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- title: Python/coreconfig.c: Missing NULL check in _Py_wstrlist_copy() -> Python/coreconfig.c: Fix _Py_wstrlist_copy() ___ Python tracker <https://bugs.python.org/issu

[issue34501] PyType_FromSpecWithBases: spec->name is dereferenced before checking for NULL

2018-08-25 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : In the following snippet from PyType_FromSpecWithBases() in Objects/typeobject.c, spec->name is dereferenced by strrchr() but then is checked for NULL: /* Set the type name and qualname */ s = strrchr(spec->name, '.');

[issue34502] Docs of sys.exit() mention utf8_mode for an unclear reason

2018-08-25 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : Docs for sys.exit() contain the following note added in https://github.com/python/cpython/blame/1871a4a35123b278443b960255cb14314ce196f6/Doc/library/sys.rst#L336 Changed in version 3.7: Added utf8_mode attribute for the new -X utf8 flag. Does it belong

[issue34502] Docs of sys.exit() mention utf8_mode for an unclear reason

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8400 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34502> ___ ___ Py

[issue34501] PyType_FromSpecWithBases: spec->name is dereferenced before checking for NULL

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8402 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34501> ___ ___ Py

[issue34501] PyType_FromSpecWithBases: spec->name is dereferenced before checking for NULL

2018-08-25 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: @enedil It seems that all later check either set a message or simply propagate the error set by a called function. Did you mean any specific later check? -- ___ Python tracker <https://bugs.python.org/issue34

[issue34503] Reference leak in PyErr_SetObject()

2018-08-25 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : 'exc_value' reference is leaked at https://github.com/python/cpython/blob/5f79b50763d687aeeed8edcb4efcc7ac9f8fa186/Python/errors.c#L113 -- components: Interpreter Core messages: 324099 nosy: benjamin.peterson, berker.peksag

[issue34503] Reference leak in PyErr_SetObject()

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8406 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34503> ___ ___ Py

[issue34504] PySequence_Check: argument is dereferenced and then checked for NULL

2018-08-25 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The argument of PySequence_Check() is dereferenced at https://github.com/python/cpython/blob/5f79b50763d687aeeed8edcb4efcc7ac9f8fa186/Objects/abstract.c#L1511 and then checked for NULL. Reported by Svace static analyzer. Since other PySomething_Check

[issue34504] PySequence_Check: argument is dereferenced and then checked for NULL

2018-08-25 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8407 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34504> ___ ___ Py

[issue34512] Document platform-specific strftime() behavior for non-ASCII format strings

2018-08-26 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : If a format string contains code points outside of ASCII range, time.strftime() can behave in four different ways depending on the platform, the current locale and the code points: * raise a UnicodeEncodeError * return an empty string * for surrogates in

[issue34512] Document platform-specific strftime() behavior for non-ASCII format strings

2018-08-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8424 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34512> ___ ___ Py

[issue34502] Docs of sys.exit() mention utf8_mode for an unclear reason

2018-08-27 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Victor, but sys.flags docs *do* contain the note[1]: Changed in version 3.7: Added dev_mode attribute for the new -X dev flag and utf8_mode attribute for the new -X utf8 flag. I've tried to express that in msg324086, but obviously failed. [1]

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Yes, I've referenced the relevant message from #6697 in #34454. The specific test you've referenced should be changed after #34481 is fixed -- it highlights inconsistency between C and Python imple

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-29 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: @p-ganssle > I'm finding it very difficult to reconcile these things. Paul, this issue was only about reconciling C and Python implementations of datetime module -- not fixing time.strftime(), which both of them delegate to. While the latter is c

[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-08-30 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > if we can't make assertions about the behavior of strftime outputs, I think > it makes it hard to prevent regressions. Ironically, some of the changes we may have to make to fix time.strftime() inconsistencies may appear like regressions to

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-09-11 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you, Gregory! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-09-11 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you, Gregory. I didn't intend to add the warning to stable branches -- it's just that 3.7 hasn't been released yet when this report was submitted. -- ___ Python tracker <https://bugs.pyt

[issue34649] Modules/_json.c: Missing NULL checks in _encoded_const()

2018-09-12 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of PyUnicode_InternFromString() is not checked for NULL and then dereferenced at three places in https://github.com/python/cpython/blob/0bd1a2dcfdf36b181385ae61361e7692f4ebb0fd/Modules/_json.c#L1369 Reported by Svace static analyzer

[issue34649] Modules/_json.c: Missing NULL checks in _encoded_const()

2018-09-12 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8656 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34649> ___ ___ Py

[issue34695] sqlite3: Cache.get() crashes if Cache.__init__() was not called

2018-09-15 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : sqlite3.Cache allows users to create uninitialized instances because it relies on __init__() instead of __new__() for initialization, which can be skipped. Cache.get() crashes if called on an uninitialized instance: >>> from sqlite3 imp

[issue34695] sqlite3: Cache.get() crashes if Cache.__init__() was not called

2018-09-15 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8754 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34695> ___ ___ Py

[issue30262] Don't expose sqlite3 Cache and Statement

2018-09-15 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Some additional motivation for removing Cache: it may be used to crash the interpreter (#31734). -- nosy: +izbyshev ___ Python tracker <https://bugs.python.org/issue30

[issue34697] ctypes: Crash if manually-created CField instance is used

2018-09-15 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : It is possible to manually create an instance of private CField type which is used by ctypes to represent fields of Structure and Union types. This instance will be uninitialized because it's normally initialized when instances of Structure/Unio

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

2018-09-15 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: What are the drawbacks of moving all code from __init__ to __new__, at least in master branch (3.8)? IMO it's much more robust than playing whack-a-mole both with ref/memleaks caused by repeated calls to __init__ and absence of initialization checks i

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The compressor/decompressor classes from bz2 and lzma modules rely on __init__() for initialization, but it is not guaranteed to be called. Method calls on an uninitialized object crash: >>> from bz2 import BZ2Compressor as C >>&g

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I somehow failed to notice #23224 when I searched the tracker. You're right, it's the same, and, moreover, PR 7822 fixes problem with both compressors and decompressors (though it includes tests only for the latter for some reason). I think

[issue34729] bz2/lzma: Compressor/decompressor crash if __init__ is not called

2018-09-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Reclosing (browser cache problem). -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue23224] bz2/lzma: Compressor/Decompressor objects are only initialized in __init__

2018-09-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: bz2 in 2.7 is also affected. Victor, do we want to fix the crash at all in stable branches? If yes, IMHO taking the slight risk of __init__ -> __new__ change is preferable to taking the trouble to implement the alternative backwards-compatible fix (i

[issue34760] Regression in abc in combination with passing a function to issubclass

2018-09-21 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker <https://bugs.python.org/issue34760> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34780] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows

2018-09-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : In the following code inspired by a production issue I had to debug recently subprocess.call() won't return: import os import subprocess import sys import time r, w = os.pipe() p1 = subprocess.Popen([sys.executable, '-c',

[issue34780] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows

2018-09-23 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8924 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34780> ___ ___ Py

[issue34874] Python 3.6.3 command script wrapped in single quotes produces NameError: name 'A' is not defined

2018-10-03 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: @Tim Is it possible that 'python3' in your command refers to some wrapper which forwards its arguments to real Python in a wrong way? -- nosy: +izbyshev ___ Python tracker <https://bugs.python.o

[issue34780] Hang on startup if stdin refers to a pipe with an outstanding concurrent operation on Windows

2018-10-15 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Ping! Thanks to @eryksun for providing feedback here and for the patch review. -- ___ Python tracker <https://bugs.python.org/issue34

[issue32256] Make patchcheck.py work for out-of-tree builds

2018-10-20 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for testing and merging, Victor! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32890] os: Some functions may report bogus errors on Windows

2018-10-22 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Python 2.7 doesn't have the same issue. In os.execve(), posix_error() is used, but it is based on errno, which is correct. (A funny bit is that os.execve('', ['a'], {}) crashes in 2.7, probably because of some checks in CRT).

[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Such casts will also trigger a CFI violation if somebody tries to build Python (and the libc, in this case) with a signature-based CFI [1, 2]. It checks that the compile-time callee signature matches the signature of the actually called function in runtime

[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : BZ2_Malloc() checks for size < 0 at https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Modules/_bz2module.c#L278 , but doesn't check for size == 0 before dividing by it: if (items < 0 || size < 0)

[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9497 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35090> ___ ___ Py

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : gallop_left() and gallop_right() functions explicitly rely on overflowing behavior of Py_ssize_t (https://github.com/python/cpython/blob/6015cc50bc38b9e920ce4986ee10658eaa14f561/Objects/listobject.c#L1361): ofs = (ofs << 1) + 1; if (of

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9498 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35091> ___ ___ Py

[issue35090] bz2: Potential division by zero in BZ2_Malloc()

2018-10-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: May be we should add a new function (_PyMem_RawMallocItems?) that does the same checks as PyMem_RawCalloc, but doesn't zero-initialize memory? -- ___ Python tracker <https://bugs.python.org/is

[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- title: bz2: Potential division by zero in BZ2_Malloc() -> Potential division by zero and integer overflow in allocator wrappers ___ Python tracker <https://bugs.python.org/issu

[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thanks, Victor. Regarding backporting, what about integer overflow? Do you think it's guaranteed that the multiple of items and size always fits in 32-bit types, in case of BZ2_Malloc and PyZlib_Malloc? -- resolution: fixed -> status

[issue35090] Potential division by zero and integer overflow in allocator wrappers

2018-10-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Sorry for changing the status, it's browser caching again. -- resolution: -> fixed status: open -> closed versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9507 ___ Python tracker <https://bugs.python.org/issue35091> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9520 ___ Python tracker <https://bugs.python.org/issue35091> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow

2018-10-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > This doesn't actually matter - the code can never trigger. Yes, I considered this, and wondered why assert wasn't used in the first place, but the explicit check with a comment suggested that possibility of overflow was deemed real. I&#

[issue35147] _Py_NO_RETURN is always empty on GCC

2018-11-02 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : Non-existing __GNUC_MAJOR__ macro is used to check for GCC version at https://github.com/python/cpython/blob/b942707fc23454a998323c17e30be78ff1a4f0e7/Include/pyerrors.h#L97 . __GNUC__ should be used instead. -- components: Interpreter Core

[issue35147] _Py_NO_RETURN is always empty on GCC

2018-11-02 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9609 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35147> ___ ___ Py

[issue35147] _Py_NO_RETURN is always empty on GCC

2018-11-02 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9611 ___ Python tracker <https://bugs.python.org/issue35147> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35147] _Py_NO_RETURN is always empty on GCC

2018-11-02 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9612 ___ Python tracker <https://bugs.python.org/issue35147> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35161] ASAN: stack-use-after-scope in grp.getgr{nam, gid} and pwd.getpw{nam, uid}

2018-11-04 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : ==24122==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffb1c62550 at pc 0x006ec66c bp 0x7fffb1c62450 sp 0x7fffb1c62448 READ of size 8 at 0x7fffb1c62550 thread T0 #0 0x6ec66b in mkpwent /scratch2/izbyshev/cpython/Modules/pwdmodule.c

[issue35161] ASAN: stack-use-after-scope in grp.getgr{nam, gid} and pwd.getpw{nam, uid}

2018-11-04 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9620 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35161> ___ ___ Py

[issue35171] test_TimeRE_recreation_timezone failure on systems with non-default posixrules

2018-11-05 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : I've got the following on OpenSUSE Tumbleweed (glibc 2.27): == FAIL: test_TimeRE_recreation_timezone (test.test_strptime.Cache

[issue35171] test_TimeRE_recreation_timezone failure on systems with non-default posixrules

2018-11-05 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9647 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35171> ___ ___ Py

[issue35170] 3.7.1 compile failure on CentOS 6.10; _ctypes did not build

2018-11-06 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: The in-tree copy of libffi was removed in #27979 (between 3.6 and 3.7) for all platforms except Windows and macOS. Therefore, you need libffi development package installed in your system to build CPython 3.7. As for PIP, personally, I think that'

[issue35191] socket.setblocking(x) treats multiples of 2**32 as False

2018-11-08 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : UBSAN with -fsanitize=implicit-integer-truncation reported a suspicious case: testSetBlocking_overflow (test.test_socket.NonBlockingTCPTests) ... /scratch2/izbyshev/cpython/Modules/socketmodule.c:2688:33: runtime error: implicit conversion from type

[issue35191] socket.setblocking(x) treats multiples of 2**32 as False

2018-11-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9695 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35191> ___ ___ Py

[issue35194] A typo in a constant in cp932 codec

2018-11-08 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : UBSan with -fsanitize=implicit-integer-truncation found a suspicious one: /scratch2/izbyshev/cpython/Modules/cjkcodecs/_codecs_jp.c:43:17: runtime error: implicit conversion from type 'unsigned int' of value 4294966013 (32-bit, unsigned) to type

[issue35194] A typo in a constant in cp932 codec

2018-11-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9700 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35194> ___ ___ Py

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9706 ___ Python tracker <https://bugs.python.org/issue35194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've added 'assert' to macros. Since 'typeof' seems to be disallowed in Python, I've used 'unsigned int' as the type of an intermediate variable. Another alternative is 'assert(0 <= (c) &&

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > Maybe test "Py_CHARMASK(c) == (c)"? This is a good alternative if multiple evaluation of 'c' is acceptable. Though I'd prefer '(unsigned char)c == c' for this style of fixing because it is bit closer

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- pull_requests: +9707 ___ Python tracker <https://bugs.python.org/issue35194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've checked than other macros in Modules/cjkcodecs/cjkcodecs.h don't avoid multiple argument evaluation (e.g. OUTCHAR2, _TRYMAP_ENC), so I've changed 'assert' to a variant

[issue35194] A typo in a constant in cp932 codec

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: OUTCHAR2 is a wrong example. Other examples are NEXT_IN, NEXT_OUT. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : address_in_range() in Objects/obmalloc.c may access memory that is mapped but is considered free by the underlying libc allocator. In #18596, address sanitizing was disabled for this function. But thread and memory sanitizers similarly trip on this

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +9714 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35204> ___ ___ Py

[issue35204] Disable thread and memory sanitizers for address_in_range()

2018-11-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've submitted a PR which implements the change with additional cleanups. GCC introduced TSan together with ASan in 4.8[1], but didn't provide a macro to test for -fsanitize=thread option until 7[2,3]. [1] https://gcc.gnu.org/gcc-4.8/chang

[issue35081] Move internal headers to Include/internal/

2018-11-10 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Victor, you moved declarations of some functions to other headers, but didn't include the new headers into files that implement the functions in some cases. For example, _PyGILState_Init was moved into Include/internal/pycore_lifecycle

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-15 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35258] Consider enabling -Wmissing-prototypes

2018-11-15 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : This issue is a follow-up of msg329608 of #35081. GCC and Clang have -Wmissing-prototypes[1] diagnostic that is reported if a global function is defined without a previous declaration containing a prototype. The reasons may be the following: 1) The

[issue35081] Move internal headers to Include/internal/

2018-11-15 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > Oh, I never saw this warning before. It seems to not be included in -Wall. > Would you mind to open a new issue to discuss it? Victor, I've opened #35258 as you suggested. -- ___ Python trac

[issue18580] distutils compilers are unicode strings on OS X since Python 2.7.4

2013-07-28 Thread Alexey Borzenkov
New submission from Alexey Borzenkov: A user reported getting a TypeError when building greenlet on OS X with Python 2.7.4 built with homebrew. The TypeError happens because we subclass build_ext so before building extensions we can change compiler's compiler_so. The problem is that in

[issue18071] _osx_support compiler_fixup

2013-07-28 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I was unaware of this issue (which homebrew works around incorrectly), and because of this I created issue 18580. The problem is indeed with unicode strings which are coming from _read_output in _osx_support. This is probably because this code was merged

[issue18071] _osx_support compiler_fixup

2013-07-28 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: Also, to reproduce it you have to temporarily move away your /usr/bin/cc and /usr/bin/clang, which then triggers the affected code path. -- ___ Python tracker <http://bugs.python.org/issue18

[issue14886] json C vs pure-python implementation difference

2012-05-23 Thread Alexey Smirnov
Changes by Alexey Smirnov : -- nosy: +alexey-smirnov ___ Python tracker <http://bugs.python.org/issue14886> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15795] Zipfile.extractall does not preserve file permissions

2012-08-27 Thread Alexey Boriskin
New submission from Alexey Boriskin: Zipfile._extract_member does not preserve file permissions while extracting it. As may be seen at link[1], raw open() is used and no os.chmod() applied after that, therefore any permission data stored in zipfile is dropped and file is created with default

[issue15795] Zipfile.extractall does not preserve file permissions

2012-09-01 Thread Alexey Boriskin
Changes by Alexey Boriskin : -- hgrepos: +147 ___ Python tracker <http://bugs.python.org/issue15795> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15795] Zipfile.extractall does not preserve file permissions

2012-09-01 Thread Alexey Boriskin
Alexey Boriskin added the comment: I'm attaching a patch, which solves the issue. Patch intoduces new argument "preserve_permissions" for extract and extractall methods. That argument may accept one of the three values: do not preserve permissions, preserve a safe subset of t

[issue20785] Missing symbols in Python27.lib (Windows 64bit)

2014-03-16 Thread Alexey Pavlov
Alexey Pavlov added the comment: For peoples who interesting in supporting building Python with mingw-w64 compiler I can get some links. More than a year ago we start providing our own builds of Python 2.7+3.3 builded with mingw-w64 compiler. I'm developer of MSYS2 project - modern fo

<    1   2   3   4   5   >