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
Alexey Izbyshev added the comment:
> Hi,
> As a disclaimer, I'm a FreeBSD developer interested in making sure we're
> doing the right thing here. =)
> May I ask what the above assessment is based on, and specifically what we
> need to address?
Hello, Kyle! That assessment
Alexey Izbyshev added the comment:
> Until muscl decides to provide an "#ifdef __MUSL__"-like or any way that it's
> musl, I propose to not support musl: don't use os.posix_spawn() but
> _posixsubprocess.
FYI, I'm researching how to use vfork(), focusing on Linux, but I
Alexey Izbyshev added the comment:
> * On FreeBSD, if setting posix_spawn() "attributes" or execute posix_spawn()
> "file actions" fails, posix_spawn() succeed but the child process exits
> immediately with exit code 127 without trying to call execv(). If
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue35674>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexey Izbyshev added the comment:
The resolution of this [1] glibc bug report effectively says that the use of
global variables tzname, timezone and daylight is not supported by glibc unless
a POSIX-style TZ setting is used (which is probably never in real world).
[1] https
Alexey Izbyshev added the comment:
> * cwd
posix_spawn_file_actions_addchdir_np() is scheduled for glibc 2.29 [1] and
exists in Solaris [2] (though its suffix indicates that it's "non-portable" --
not in POSIX). POSIX also has a bug for this [7].
> * s
Alexey Izbyshev added the comment:
> I'm open to experiment to use vfork() in _posixsubprocess
Are you going to do experiments? If not, I can try to do some in early January.
> Using vfork() can cause new issues: that's why there is a
> POSIX_SPAWN_USE_VFORK flag (the c
Alexey Izbyshev added the comment:
Victor and Joannah, thanks for working on adding vfork() support to subprocess.
Regarding speedups in the real world, I can share a personal anecdote. Back at
the time when AOSP was built with make (I think it was AOSP 5) I've observed
~2x slowdown
Alexey Izbyshev added the comment:
Serhiy, PyOS_* functions are called only if preexec_fn != None. But it will
never be possible to implement support for preexec_fn (and some other
subprocess features, e.g. close_fds) if processes are run via posix_spawn, so I
don't see why anything should
Change by Alexey Izbyshev :
--
nosy: +gregory.p.smith, izbyshev
___
Python tracker
<https://bugs.python.org/issue35537>
___
___
Python-bugs-list mailin
Alexey Izbyshev added the comment:
argparse.SUPPRESS is an opaque value to be used by argparse clients. It could
be anything, it just happens to be a string. So the code doesn't compare
strings but checks whether a supplied object *is* the opaque value. I do not
see any problem
Alexey Izbyshev added the comment:
How is it possible to use faulthandler if the interpreter hasn't even started
yet?
--
___
Python tracker
<https://bugs.python.org/issue35
Alexey Izbyshev added the comment:
You might try to check the list of DLLs loaded into the stuck python process
and find third-party ones (e.g., antivirus). If there are any, disable the
third-party software and try again.
--
nosy: +izbyshev
Alexey Izbyshev added the comment:
> Would it make sense to backport this fix in 3.6 and 3.7?
I'd like to see it there, given that this bug surfaced in many use cases not
involving any modern features or systemd at all.
--
___
Python trac
Alexey Izbyshev added the comment:
> I prefer to stick to the initial bug report which hasn't been fixed in 8 years
I'm interested in fixing this bug too since it bit me in SCons and I had to use
a local patch for it. I welcome the upstream fix and don't object to PR 10919.
Alexey Izbyshev added the comment:
If I understood PR 10919 correctly, sysconfig.get_config_var('userbase') can
now return unexpanded paths containing '~'. Is it intended despite the previous
discussion starting with msg135047?
--
nosy: +izbyshev
Alexey Izbyshev added the comment:
See #28108 and https://sourceware.org/bugzilla/show_bug.cgi?id=23859 (for
msg276123).
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue35
Alexey Izbyshev added the comment:
Correction: the fall-through in "else if (res == -3)" clause doesn't cause a
memory leak, but still results in usage of uninitialized 'str'.
--
___
Python tracker
<https://bugs.python.o
Alexey Izbyshev added the comment:
The added test exposed a leak in unicode_encode_locale(). See msg330534.
--
___
Python tracker
<https://bugs.python.org/issue34
Alexey Izbyshev added the comment:
This is because of a leak of 'wstr' at
https://github.com/python/cpython/blob/1005c84535191a72ebb7587d8c5636a065b7ed79/Objects/unicodeobject.c#L3476
.
There is another leak and usage of uninitialized 'str' because the following
"else if" clau
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
Change by Alexey Izbyshev :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9714
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35204>
___
___
Py
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
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:
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 :
--
pull_requests: +9707
___
Python tracker
<https://bugs.python.org/issue35194>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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: +9706
___
Python tracker
<https://bugs.python.org/issue35194>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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:
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9647
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35171>
___
___
Py
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: +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
Change by Alexey Izbyshev :
--
pull_requests: +9612
___
Python tracker
<https://bugs.python.org/issue35147>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
pull_requests: +9611
___
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:
> 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:
Change by Alexey Izbyshev :
--
pull_requests: +9507
___
Python tracker
<https://bugs.python.org/issue35091>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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:
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 :
--
keywords: +patch
pull_requests: +9498
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35091>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +9497
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35090>
___
___
Py
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
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
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:
Thank you for testing and merging, Victor!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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:
@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 :
--
keywords: +patch
pull_requests: +8924
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34780>
___
___
Py
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 :
--
nosy: +izbyshev
___
Python tracker
<https://bugs.python.org/issue34760>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Alexey Izbyshev added the comment:
Reclosing (browser cache problem).
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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 in all
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/Union
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8754
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34695>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8656
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34649>
___
___
Py
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
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 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:
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 implementations
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
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8407
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34504>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8406
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34503>
___
___
Py
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, 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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8402
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34501>
___
___
Py
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8400
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34502>
___
___
Py
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
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, '.');
if (s =
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
Change by Alexey Izbyshev :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue34492>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
pull_requests: +8395
___
Python tracker
<https://bugs.python.org/issue34492>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8383
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34493>
___
___
Py
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
Change by Alexey Izbyshev :
--
keywords: +patch
pull_requests: +8382
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34492>
___
___
Py
101 - 200 of 331 matches
Mail list logo