[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for merging! -- resolution: -> fixed ___ Python tracker <https://bugs.python.org/issue34435> ___ ___ Python-

[issue34435] Missing NULL check in unicode_encode_ucs1()

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

[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

2018-08-20 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : >>> from abc import ABCMeta >>> class S(metaclass=ABCMeta): ... __subclasses__ = None ... >>> issubclass(int, S) Segmentation fault (core dumped) This is the result of missing NULL check for 'subclasses' in _abc__abc_subclas

[issue34456] pickle: Missing NULL check in save_global()

2018-08-22 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 ___ Python tracker <https://bugs.python.or

[issue34456] pickle: Missing NULL check in save_global()

2018-08-22 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: No, I couldn't find any similar calls in save_global() in 2.7. However, there is Py_BuildValue() call in initcPickle(), and its result is passed unchecked to PyDict_SetItemString(), where it's eventually dereferenced. In fact, all PyDict_SetItemString

[issue34457] Missing NULL check in alias_for_import_name() from Python/ast.c

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

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

2018-08-23 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The return value of new_delta() is not checked for NULL at https://github.com/python/cpython/blob/ccd99752675042bd5f67d332c5b0ed85ba1f2da3/Modules/_datetimemodule.c#L1292 and then dereferenced. Reported by Svace static analyzer. -- components

[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

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

[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

[issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__

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

[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The code at https://github.com/python/cpython/blob/28853a249b1d0c890b7e9ca345290bb8c1756446/Modules/_xxsubinterpretersmodule.c#L18 checks a wrong variable for NULL: const char *str = PyUnicode_AsUTF8(strobj); if (str == NULL) { return

[issue34462] _xxsubinterpreters: Wrong NULL check in _copy_raw_string()

2018-08-22 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8337 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34462> ___ ___ 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] https

[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

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

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

[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.python.org/issue32

[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

[issue33010] os.path.isdir() returns True for broken directory symlinks or junctions

2018-03-06 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Thank you for the detailed response, Eryk! > A mount point is always a directory, even if the volume isn't currently > available. Do I understand correctly that you propose to additionally change os.path.exists() to

[issue33010] os.path.isdir() returns True for broken directory symlinks or junctions

2018-03-06 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Hmm, actually, my NFS example is probably bad. I've run an experiment, and stat() simply hangs in the case if the NFS server is down. -- ___ Python tracker <rep...@bugs.python.or

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-06 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- keywords: +patch pull_requests: +5775 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-06 Thread Alexey Izbyshev
New submission from Alexey Izbyshev <izbys...@ispras.ru>: The first call of GetFinalPathNameByHandleW requests the required buffer size for the NT path (VOLUME_NAME_NT), while the second call receives the DOS path (VOLUME_NAME_DOS) in the allocated buffer. Usually, NT paths are longe

[issue33018] Improve issubclass() error checking and message

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: I do not see any point in allowing non-types in ABCMeta.__subclasscheck__. Currently, ABCs are clearly not designed to support non-types: 1. ABCMeta.register() accepts types only. 2. ABCMeta.__subclasscheck__ implicitly requir

[issue33018] Improve issubclass() error checking and message

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > Isn't it just a limitation? > Most Python-implemented objects supports weakref. I don't think "requiring > weakref support implies it must be type object". Formally, there is no implication. It is the ab

[issue33018] Improve issubclass() error checking and message

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: PR 5944 changes ABC.__subclasscheck__ (not issubclass) to check its first argument, so if it's merged there will be no crash even with the revert. -- ___ Python tracker <rep...@bugs.p

[issue32903] os.chdir() may leak memory on Windows

2018-03-01 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- pull_requests: +5715 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32903> ___

[issue33030] GetLastError() may be overwritten by Py_END_ALLOW_THREADS

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > Ideally, if we don't have to do any work to reacquire the GIL, we shouldn't > do any work to preserve the error code either. Before take_gil() knows whether it has to do any work, it calls MUTEX_LOCK(_PyRuntime.ceval.gil.m

[issue33030] GetLastError() may be overwritten by Py_END_ALLOW_THREADS

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: FWIW, GetLastError() docs[1] officially scare us: Most functions that set the thread's last-error code set it when they fail. However, some functions also set the last-error code when they succeed. If the function is not docu

[issue32592] Drop support of Windows Vista in Python 3.7

2018-03-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- nosy: +izbyshev ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32592> ___ _

[issue29871] Enable optimized locks on Windows

2018-03-08 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- nosy: +izbyshev ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29871> ___ _

[issue33030] GetLastError() may be overwritten by Py_END_ALLOW_THREADS

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: @eryksun Very interesting! BTW, I looked at CreateFile docs, and the fact that it may set the last error to zero is even documented there. @steve.dower > maybe we don't have to preserve errno on Windows? There are still pla

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > Because we only try VOLUME_NAME_DOS, this function always fails for a volume > that's not mounted as either a drive letter or a junction mount point. If a volume is not mounted, users have to use \\?\ or \\.\ eit

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Copying the comment of @eryksun from PR 6010 for reference. Because we only try VOLUME_NAME_DOS, this function always fails for a volume that's not mounted as either a drive letter or a junction mount point. The error in thi

[issue33018] Improve issubclass() error checking and message

2018-03-10 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: I agree except that I'd like to see it in 3.7 too. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > We know that the path is valid because we have a handle (in this case the > file system ensures that no parent directory in the path can be unlinked or > renamed). Thank you for pointing this out. I erroneously stated

[issue33016] nt._getfinalpathname may use uninitialized memory

2018-03-08 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > unless users are not prepared to deal with it ARE prepared > What do you think about handling this failure by calling GetFullPathName > instead (e.g. "C:\Temp\NUL" => "\\.\NUL")? I think it w

[issue33018] Improve issubclass() error checking and message

2018-03-09 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Regarding status quo (expanding the examples of @inada.naoki and @jab): >>> import typing >>> import collections.abc as cabc >>> issubclass(typing.Mapping, cabc.Mapping) Traceback (most recent call las

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-07 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Sorry for status update, this was due to a concurrent modification. -- nosy: +jab resolution: -> fixed status: open -> closed ___ Python tracker <rep...@bugs.pyt

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-07 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: @inada.naoki: I don't question your change. My point is the same as in #33018 (I've discovered that PR only after I commented). The error message is misleading, and it's just a coincidence that a TypeError and not some other

[issue33018] Improve issubclass() error checking and message

2018-03-07 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: ABC.register() has an explicit check, and it is mentioned in PEP 3119. The point here is not to change issubclass(), but to change ABC.__subclasscheck__(). It may conceivably have stricter requirements than issubclass

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

2018-04-11 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: An alternative fix is here: https://github.com/izbyshev/cpython/commit/b89b52f28490b69142d5c061604b3a3989cec66c Feel free to use the test if you don't like the approach :) -- ___

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

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

2018-03-25 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: Actually I've started to work on this with #32844, but got no feedback. This issue may of course be fixed independently, but the problems with descriptor ownership for fds <= 2 will remain unless all ownership problems are fixed

[issue32871] Interrupt .communicate() on SIGTERM/INT

2018-03-04 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: @ajk225 It may be useful to look at #25942 before working on this. -- nosy: +izbyshev ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-05 Thread Alexey Izbyshev
New submission from Alexey Izbyshev <izbys...@ispras.ru>: Demo: >>> from abc import ABC >>> issubclass(1, ABC) Segmentation fault (core dumped) The stack trace is attached. Before reimplementation of abc in C, the result was confusing too: Python 3.6.4 (v3.6.4:d48ece

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-05 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > Is there any sense in accepting non-types as the first argument of > issubclass()? No, though it is not (clearly) documented. The docs mention TypeError, but only for the second argument if my reading is correct.

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-05 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: In debug mode, the following assertion fails: python: ./Modules/_abc.c:642: _abc__abc_subclasscheck_impl: Assertion `((PyObject*)(mro))->ob_type))->tp_flags & ((1UL <&l

[issue33001] Buffer overflow vulnerability in os.symlink on Windows

2018-03-05 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: While judging by the source code it seems that bytes in 3.5 should be fine, I've got a crash with the latest binary from python.org: Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32 Type

[issue33001] Buffer overflow vulnerability in os.symlink on Windows

2018-03-05 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: > As os.symlink requires administrative privileges on most versions of Windows The current implementation requires SeCreateSymbolicLinkPrivilege on ALL versions of Windows because users must pass an additional flag to CreateSym

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-05 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: I've also checked that ABC.register() doesn't allow non-classes (and PEP 3119 mentions that). Looking at PyObject_IsSubclass in Objects/abstract.c, the only case in which its check_class() could be avoided is if there is a

[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-02-27 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- nosy: +izbyshev ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31512> ___ _

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-05 Thread Alexey Izbyshev
Change by Alexey Izbyshev <izbys...@ispras.ru>: -- versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32999> ___

[issue33010] os.path.isdir() returns True for broken directory symlinks or junctions

2018-03-06 Thread Alexey Izbyshev
New submission from Alexey Izbyshev <izbys...@ispras.ru>: os.path.isdir() violates its own documentation by returning True for broken directory symlinks or junctions, for which os.path.exists() returns False: >>> os.mkdir('b') >>> import _winapi >&

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-06 Thread Alexey Izbyshev
Alexey Izbyshev <izbys...@ispras.ru> added the comment: OK, making a new implementation behave as the old one is fine with me too. BTW, do TypeErrors related to weak references deserve any treatment? Isn't it a kind of coincidence that the error raised due to usage of WeakSet in issu

[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

[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). And os.truncate

[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

[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

[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've submit

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

[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/issue35

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

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

[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: clo

[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.org/i

[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

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

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

[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

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

[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

[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

[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

[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/changes.html [2

[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

[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

[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-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 'unsigned

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

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

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

[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

[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's

[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

[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 to what happens in '((*ou

[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) && (c) <= 255)', but 'c' will be evaluated

[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 of what Serhiy suggested

[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

[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

[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.org/issue34

[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', 'import

[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

[issue35537] use os.posix_spawn in subprocess

2019-01-16 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > One of the issue that I have with using posix_spawn() is that the *exact* > behavior of subprocess is not properly defined by test_subprocess. Should we > more more tests, or document that the exact behavior is "an implementation > de

<    1   2   3   4   >