Alexey Izbyshev added the comment:
Thank you for merging!
--
resolution: -> fixed
___
Python tracker
<https://bugs.python.org/issue34435>
___
___
Python-
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8302
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34435>
___
___
Py
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
Change by Alexey Izbyshev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.5
___
Python tracker
<https://bugs.python.or
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
Change by Alexey Izbyshev :
--
pull_requests: +8329
___
Python tracker
<https://bugs.python.org/issue34457>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8345
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34471>
___
___
Py
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8310
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34441>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8337
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34462>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8424
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34512>
___
___
Py
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
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
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
Alexey Izbyshev added the comment:
Thank you, Gregory!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
keywords: +patch
pull_requests: +5775
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
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
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
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
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
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
pull_requests: +5715
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32903>
___
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
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
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
nosy: +izbyshev
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32592>
___
_
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
nosy: +izbyshev
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29871>
___
_
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
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
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
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
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
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
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
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
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
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
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 :)
--
___
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bu
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
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
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
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.
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
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
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
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
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
nosy: +izbyshev
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31512>
___
_
Change by Alexey Izbyshev <izbys...@ispras.ru>:
--
versions: +Python 3.7
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32999>
___
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
>&
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
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
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9498
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35091>
___
___
Py
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
Change by Alexey Izbyshev :
--
pull_requests: +9520
___
Python tracker
<https://bugs.python.org/issue35091>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Alexey Izbyshev :
--
pull_requests: +9507
___
Python tracker
<https://bugs.python.org/issue35091>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9497
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35090>
___
___
Py
Change by Alexey Izbyshev :
--
pull_requests: +9611
___
Python tracker
<https://bugs.python.org/issue35147>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
pull_requests: +9612
___
Python tracker
<https://bugs.python.org/issue35147>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9609
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35147>
___
___
Py
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
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9647
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35171>
___
___
Py
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9695
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35191>
___
___
Py
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
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9714
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35204>
___
___
Py
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9700
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35194>
___
___
Py
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
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
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Alexey Izbyshev added the comment:
OUTCHAR2 is a wrong example. Other examples are NEXT_IN, NEXT_OUT.
--
___
Python tracker
<https://bugs.python.org/issue35
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
Change by Alexey Izbyshev :
--
pull_requests: +9706
___
Python tracker
<https://bugs.python.org/issue35194>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Alexey Izbyshev :
--
pull_requests: +9707
___
Python tracker
<https://bugs.python.org/issue35194>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9620
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35161>
___
___
Py
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
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
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue34760>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8924
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34780>
___
___
Py
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
101 - 200 of 331 matches
Mail list logo