Eryk Sun added the comment:

parse_envlist is calling PyUnicode_FromFormat with the format "%U=%U", but 
passing it bytes:

    |Debug Error!

    Program: C:\Program Files\Python36\python_d.exe

    abort() has been called

    (Press Retry to debug the application)
    (1e8.374): Break instruction exception - code 80000003 (first chance)
    ucrtbased!issue_debug_notification+0x45:
    00007ffc`aa1f1985 cc              int     3
    1:002> k 0n12
    Child-SP          RetAddr           Call Site
    00000030`a5fe9bb0 00007ffc`aa1f1b23 ucrtbased!issue_debug_notification+0x45
    00000030`a5fe9c00 00007ffc`aa212d7d 
ucrtbased!__acrt_report_runtime_error+0x13
    00000030`a5fe9c60 00007ffc`aa2184cf ucrtbased!abort+0x1d
    00000030`a5fe9ca0 00007ffc`aa2164c8 
ucrtbased!common_assert_to_stderr<wchar_t>+0xbf
    00000030`a5fe9d00 00007ffc`aa218e7f ucrtbased!common_assert<wchar_t>+0x68
    00000030`a5fe9d40 00000000`60e59045 ucrtbased!_wassert+0x2f
    00000030`a5fe9d70 00000000`60eb9f71 
python36_d!_PyUnicode_CheckConsistency+0x45
    00000030`a5fe9e00 00000000`60e4cd07 python36_d!unicode_fromformat_arg+0xc81
    00000030`a5fe9fa0 00000000`60e4cc31 python36_d!PyUnicode_FromFormatV+0xa7
    00000030`a5fea040 00000000`60c69853 python36_d!PyUnicode_FromFormat+0x31
    00000030`a5fea080 00000000`60c68286 python36_d!parse_envlist+0x1c3
    00000030`a5fea180 00000000`60c5d4ee python36_d!os_spawnve_impl+0x1d6

    1:002> .frame 6
    06 00000030`a5fe9d70 00000000`60eb9f71 
python36_d!_PyUnicode_CheckConsistency+0x45
    1:002> ?? op->ob_type->tp_name
    char * 0x00000000`60fe1248
     "bytes"

parse_envlist used to call PyUnicode_FSConverter on key and val; get the 
underlying buffers via PyBytes_AsString; allocate a new buffer and copy key and 
val into "%s=%s". Now it instead calls PyUnicode_FromFormat for "%U=%U" and 
then fsconvert_strdup, which has been modified to call 
PyUnicode_AsWideCharString on Windows and otherwise PyUnicode_FSConverter. 

For Windows it could use PyUnicode_FSDecoder on key and val in combination with 
PyUnicode_FromFormat and the format string "%U=%U". For Unix it could use 
PyUnicode_FSConverter for key and val in combination with PyBytes_FromFormat 
and the format string "%s=%s".

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28114>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to