Author pablogsal
Recipients lkollar, ned.deily, pablogsal, ronaldoussoren
Date 2019-03-08.12:38:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552048697.72.0.732545146298.issue36236@roundup.psfhosted.org>
In-reply-to
Content
This is happening because _Py_wgetcwd returns NULL (although the underliying getcwd system call populates the `fullpath` variable correctly) but its caller, _PyPathConfig_ComputeArgv0, does not check the return value:

            _Py_wgetcwd(fullpath, Py_ARRAY_LENGTH(fullpath));
             argv0 = fullpath;

 and its caller, pymain_run_python, interprets a failure in _PyPathConfig_ComputeArgv0 as a memory problem:

         PyObject *path0 = _PyPathConfig_ComputeArgv0(config->argc,
                                                      config->argv);
         if (path0 == NULL) {
             err = _Py_INIT_NO_MEMORY();
             goto done;
         }
History
Date User Action Args
2019-03-08 12:38:17pablogsalsetrecipients: + pablogsal, ronaldoussoren, ned.deily, lkollar
2019-03-08 12:38:17pablogsalsetmessageid: <1552048697.72.0.732545146298.issue36236@roundup.psfhosted.org>
2019-03-08 12:38:17pablogsallinkissue36236 messages
2019-03-08 12:38:17pablogsalcreate