Change by Alexey Izbyshev :
--
keywords: +patch, patch, patch
pull_requests: +11484, 11485, 11486
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +11484
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35823>
___
_
Change by Alexey Izbyshev :
--
keywords: +patch, patch
pull_requests: +11484, 11485
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Alexey Izbyshev added the comment:
> Is sys.platform equal to 'linux' on WSL? Sorry, I don't know WSL. If it's
> equal, is it possible to explicitly exclude WSL in the subprocess test,
> _use_posix_spawn()?
I don't have immediate access to WSL righ
Alexey Izbyshev added the comment:
> W.r.t. closing all file descriptors > 2: posix_spawn_file_actions_addclose
> can do this when using posix_spawn. That would have a performance cost, you'd
> basically have to resort to closing all possible file descriptors and cannot
Alexey Izbyshev added the comment:
I've checked subprocess.Popen() error reporting in QEMU user-mode and WSL and
confirm that it works both with my patch (vfork/exec) and the traditional
fork/exec, but doesn't work with glibc's posix_spawn.
The first command below u
Alexey Izbyshev added the comment:
Thank you for the review and your thoughts, Gregory.
> With this in place we may want to make the _use_posix_spawn() logic in
> subprocess.py stricter? That could be its own followup PR.
Yes, I think we can always use vfork() on Linux unless we fin
Alexey Izbyshev added the comment:
I've been struggling with fixing spurious -Wclobbered GCC warnings. Originally,
I've got the following:
/scratch2/izbyshev/cpython/Modules/_posixsubprocess.c: In function
‘subprocess_fork_exec’:
/scratch2/izbyshev/cpython/Modules/_posixsubproces
New submission from Alexey Izbyshev :
Victor Stinner pointed out that on x86 Gentoo Installed with X 3.x buildbot,
there is a compiler warning:
Python/pystate.c:1483:18: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
(https://buildbot.python.org/all
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +11852
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35972>
___
_
Alexey Izbyshev added the comment:
"long long" is mandated to be at least 64-bit by C99 (5.2.4.2.1 Sizes of
integer types). If it were 32-bit, no warnings would have been issued.
--
___
Python tracker
<https://bugs.python.o
Alexey Izbyshev added the comment:
I'll look into it later today. An obvious guess is that my test simply exposed
an existing leak because the exception code path wasn't tested before AFAIK,
but I need to check it.
--
assignee: -
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +11876
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issu
Alexey Izbyshev added the comment:
Thank you for your introduction about _xxsubinterpreters, Eric.
This particular leak is easy: it's right in _channel_send(). I've submitted a
PR.
I've also done a quick scan of neighboring code, and it seems there are other
lea
Alexey Izbyshev added the comment:
I don't know what you mean by "in-line" pre-processing output, but you can use
-E option to get the normal preprocessor output. Line directives will tell you
where those functions come from on a system where there is no compilation error.
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue36046>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
> Interesting. Because both errors/conditions are mapped to
> ERROR_INVALID_HANDLE we need the creation time. I can work on a patch for
> that.
I don't understand why any patch for CPython is needed at all. Using invalid
handles is a serio
Change by Alexey Izbyshev :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue36046>
___
___
Python-bugs-list mailing list
Un
Alexey Izbyshev added the comment:
Patrick, could you provide more background that would explain your choice of
setreuid/setregid functions and the desired handling of supplementary groups?
I'm not a security expert, so I may not have sufficient expertise to judge on
that, but may
Alexey Izbyshev added the comment:
> 1) This is intentional, this is for dropping privileges before running some
> (possibly untrusted) command, we do not want to leave a path for the
> subprocess to gain root back. If there is a subprocess that needs root for
> some operatio
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
Any feedback on the updated PR?
--
___
Python tracker
<https://bugs.python.org/issue32236>
___
___
Python-bugs-list mailin
Alexey Izbyshev added the comment:
Any objections to the PR?
--
nosy: +belopolsky, eric.araujo
___
Python tracker
<https://bugs.python.org/issue32256>
___
___
New submission from Alexey Izbyshev :
_Py_set_inheritable() raises a Python-level exception on error and thus is not
async-signal-safe, but child_exec() must use only async-signal-safe functions
because it's executed between fork() and exec().
Since a non-raising version is al
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5382
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32777>
___
___
Py
Alexey Izbyshev added the comment:
> out of curiosity, did you actually diagnose a process deadlocked due to this
> or was it noted via code inspection?
The latter. I noted it while working on another issue. While it was easy to
trigger a malloc() in child_exec() by e.g. specify
New submission from Alexey Izbyshev :
When redirecting, subprocess attempts to achieve the following state: each fd
to be redirected to is less than or equal to the fd it is redirected from,
which is necessary because redirection occurs in the ascending order of
destination descriptors. It
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5482
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32844>
___
___
Py
Alexey Izbyshev added the comment:
Note that the PR doesn't attempt to fix leaking of low dup'ed fds to the child.
I'll file a separate report for that in a while.
--
___
Python tracker
<https://bugs.pyt
New submission from Alexey Izbyshev :
os.dup2() tests for dup3() system call availability at runtime, but doesn't
remember the result across calls, repeating the test on each call with
inheritable=False even if the test fails.
Judging by the code, 'dup3_works' was intended to
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5497
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32859>
___
___
Py
New submission from Alexey Izbyshev :
os.dup2(fd, fd, inheritable=False) may fail or change fd inheritability in
following ways:
1) POSIX without F_DUP2FD_CLOEXEC
1.1) dup3() is available (a common case for Linux): OSError (EINVAL, dup3()
doesn't allow equal descriptors)
1.2) dup3() i
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5503
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32862>
___
___
Py
Alexey Izbyshev added the comment:
ktrace shows that dup(0) succeeded but fstat(0) failed. The symptom is the same
as in #30225. Could you check whether any of the following quick tests produces
the same error?
python3 -c 'import os, subprocess, sys; r, w = os.pipe(); os.cl
Alexey Izbyshev added the comment:
>Also, it has to skip this check if the FD is flagged as a pipe, because a pipe
>is likely opened in synchronous mode and blocked on a read in the parent, in
>which case calling GetFileType would deadlock.
Does an FD get flagged as a pipe b
Alexey Izbyshev added the comment:
@eryksun: Thank you for the note! I've commented on #32865. This adds even more
inconsistency to this corner case.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Alexey Izbyshev :
MultiByteToWideChar expects the destination buffer size to be given in wide
characters, not bytes.
This is currently not a real issue since _Py_fopen_obj is only used internally
with mode being a short constant string in all call sites I've
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5517
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32869>
___
___
Py
Change by Alexey Izbyshev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexey Izbyshev added the comment:
Thank you for checking. If this issue happens even when Python is run manually
from an ordinary shell, fixing it in the same way as in #30225 is probably not
what you want because while the error message will be gone the corresponding
std stream will be
Alexey Izbyshev added the comment:
> I think that we can even drop dup-based validation from is_valid_fd()
For POSIX, that is. There is no fstat on Windows, and dup is probably OK there
(or, even better, dup2(fd, fd) -- no need to cl
Alexey Izbyshev added the comment:
OK, never mind with the test. I've finally got to a FreeBSD box and reproduced
the problem. It has to do with 'revoke' feature of *BSD. When revoke is called
on a terminal device (as part of logout process, for example), all descriptors
ass
Alexey Izbyshev added the comment:
> But I'm not sure why it can be solved, sometimes, by restarting the the
> daemon.
Could it be simply because daemon is respawned from a process that does have a
valid stdin at the time of respawn?
Note that daemon has an option to redirect std
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5552
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32849>
___
___
Py
New submission from Alexey Izbyshev :
Demo:
>>> import os
>>> os.chdir(-1)
Traceback (most recent call last):
File "", line 1, in
OSError: [Errno 14] Bad address: -1
>>> os.chdir(-2)
Traceback (most recent call last):
File "", line 1,
Change by Alexey Izbyshev :
--
nosy: +larry
___
Python tracker
<https://bugs.python.org/issue32887>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexey Izbyshev :
Demo:
>>> os.execve('', ['a'], {})
Traceback (most recent call last):
File "", line 1, in
OSError: [WinError 0] The operation completed successfully: ''
The reason is that path_error() used throughout
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5565
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32890>
___
___
Py
Alexey Izbyshev added the comment:
The failed test is test_posix_fallocate, not test_posix_fallocate_errno. The
former special-cases Solaris for EINVAL already, and the latter merely passes
an invalid descriptor.
It seems that this particular issue is still open only because there is no NEWS
New submission from Alexey Izbyshev :
'new_path' is not freed if the new directory is a UNC path longer than MAX_PATH.
--
components: Extension Modules, Windows
messages: 312522
nosy: izbyshev, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severi
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5579
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32903>
___
___
Py
New submission from Alexey Izbyshev :
win32_wchdir() retries GetCurrentDirectory() with a larger buffer if necessary,
but doesn't check whether the new buffer is large enough. Another thread could
change the current directory in meanwhile, so the buffer could turn out to be
still not
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5580
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32904>
___
___
Py
Change by Alexey Izbyshev :
--
versions: +Python 2.7
___
Python tracker
<https://bugs.python.org/issue32903>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
The same issue applies to os.getcwd().
--
title: os.chdir() may crash on Windows in presence of races -> os.chdir(),
os.getcwd() may crash on Windows in presence of races
___
Python tracker
<
New submission from Alexey Izbyshev :
==
FAIL: test_resolve_common (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
File "C:\work
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5587
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32907>
___
___
Py
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue32920>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
This behavior is not specific to just Windows 8. Symlinks to directories are
treated as directories on Windows, in particular, they should be removed with
RemoveDirectory, not DeleteFile.
Is there any reason this issue is still open?
--
nosy
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue31512>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
pull_requests: +5715
___
Python tracker
<https://bugs.python.org/issue32903>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
@ajk225 It may be useful to look at #25942 before working on this.
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue32
New submission from Alexey Izbyshev :
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:d48eceb, Dec 19 2017, 06:54:40)
Alexey Izbyshev 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 << 26))) != 0)' failed.
--
_
Alexey Izbyshev 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.
In practice, issubclass() ra
Alexey Izbyshev 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 "help", "
Alexey Izbyshev 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
CreateSymbolicLink to enable
Alexey Izbyshev 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 custom __subcl
Change by Alexey Izbyshev :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue32999>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexey Izbyshev :
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
>>> _winapi.Cre
Alexey Izbyshev 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
issubclass(obj, ABC) is wh
Alexey Izbyshev 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 return True for mount
Alexey Izbyshev 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
<https://bugs.python.org/is
New submission from Alexey Izbyshev :
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 longer than
DOS ones, for example
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +5775
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33016>
___
___
Py
Alexey Izbyshev added the comment:
Sorry for status update, this was due to a concurrent modification.
--
nosy: +jab
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Alexey Izbyshev 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
error is
Alexey Izbyshev 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() has. But certainly an advice from
Alexey Izbyshev 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 requires its arguments to support weak
Alexey Izbyshev 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 abc module authors who
Alexey Izbyshev 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
<https://bugs.python.org/is
Alexey Izbyshev 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 documented to set the last-
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue32592>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue29871>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev 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.mutex),
Alexey Izbyshev 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 places where errno is relied
Alexey Izbyshev 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 this case is ERROR_PATH_NOT_
Alexey Izbyshev 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 \\.\ either directly or
indirectly via a
Alexey Izbyshev 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 would indeed be nice if pathlib h
Alexey Izbyshev 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 that the length of the
p
Alexey Izbyshev 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 last):
File ""
Alexey Izbyshev added the comment:
I agree except that I'd like to see it in 3.7 too.
--
___
Python tracker
<https://bugs.python.org/issue33018>
___
___
Alexey Izbyshev 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
Change by Alexey Izbyshev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alexey Izbyshev 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 :)
--
___
Python tracker
&
Alexey Izbyshev added the comment:
For added fun: at least one part of the standard library doesn't expect None
returns from read() in the buffering layer.
>>> import os
>>> r, w = os.pipe2(os.O_NONBLOCK)
>>> f = os.fdopen(r, 'r')
>>>
Alexey Izbyshev added the comment:
Yes, your claim is confirmed by the fact that there have been little interest
in this issue since 2011. Still, non-blocking behavior is incorrectly specified
in the docs and is inconsistent (as investigated by Martin). And obscure errors
like in my example
New submission from Alexey Izbyshev :
The fact that "buffering=1" is usable only in text mode is documented for
open(). In binary mode, setting buffering to 1 is silently ignored and
equivalent to using default buffer size. I argue that such behavior is:
1. Inconsistent
For example
Alexey Izbyshev added the comment:
Yes, clarifying buffering for text mode in open() would be nice.
@direprobs: just in case you didn't know, you can achieve what you want with
something like the following in pre-3.7:
with open("/dev/null", "wb&quo
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +4663
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32256>
___
___
Py
101 - 200 of 331 matches
Mail list logo