Eryk Sun added the comment:
> I don't understand why Python behaves differently in debug mode.
> For me, if Python is able to trigger an exception on EINVAL, we
> should also get a regular Python exception in debug mode (and not
> a crash)
The debug build's behavior isn't related to the
STINNER Victor added the comment:
> Crashing happens only with the debug build.
I don't understand why Python behaves differently in debug mode. For me, if
Python is able to trigger an exception on EINVAL, we should also get a regular
Python exception in debug mode (and not a crash).
Serhiy Storchaka added the comment:
Crashing happens only with the debug build. With the release mode I got
OSError(EINVAL). I think it is better to raise the same error in all builds.
ValueError is not new, it is already raised for paths containing NUL and too
long paths.
--
Eryk Sun added the comment:
Serhiy, an empty file path shouldn't crash the interpreter. The per-thread
invalid parameter handler is suppressed before calling _wspawnv, so it should
raise OSError (EINVAL) if the file path is empty. That's what I observe in 3.7.
Are you suggesting to raise
Serhiy Storchaka added the comment:
All three test cases are raising a VallueError now:
C:\py\cpython3.8>python -c "import os; os.spawnl(os.P_WAIT, '')"
Running Debug|x64 interpreter...
Traceback (most recent call last):
File "", line 1, in
File "C:\py\cpython3.8\\lib\os.py", line 931,
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
added some tests (not sure if in appropriate place).
--
Added file: http://bugs.python.org/file23529/issue_8036_1.patch
___
Python tracker rep...@bugs.python.org
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
against py3k branch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
Now we are using Mercurial, and what was called 'py3k' on SVN is now 'default'.
Since we now commit on older branches first and then merge with the most
recent ones, the patch should either be against 3.2 or 2.7.
You can check the
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
@nvetoshkin: Can you please also write tests (in Lib/test/test_os.py) for your
patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.3 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
___
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
Attached first attempt to close this issue. Are there enough checks? It passes:
os.spawnl(os.P_WAIT, '')
os.spawnl(os.P_WAIT, 'path')
os.spawnl(os.P_WAIT, 'path', '')
--
keywords: +patch
nosy: +nvetoshkin
Added file:
Changes by Ralf Schmitt sch...@gmail.com:
--
nosy: +schmir
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
___
Python-bugs-list mailing
David Stanek dsta...@dstanek.com added the comment:
Should this just be resolved as a won't fix?
--
nosy: +dstanek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
No, the issue can be fixed by better checking the arguments.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
Jean-Paul Calderone exar...@divmod.com added the comment:
Why is the Microsoft CRT argument error handler no longer disabled?
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
2.6 and 3.0.1 used to disable the Microsoft CRT argument error handler: they
return EINVAL, but newer versions don't, and should check their arguments
before calling _spawnv.
FWIW, the checks are::
pathname != NULL
*pathname
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Because this is a global setting for the whole process. This was discussed with
issue4804.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
In case it matters, 3.0.1 does NOT crash.
--
nosy: +gagenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8036
___
19 matches
Mail list logo