GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `pythonrun.c`: main_module ref leak in `_PyRun_SimpleStringFlagsWithName` · Issue #146355 · python/cpython Closed Labels interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:Bug reportBug description:This is a sub-issue for #146102 and original gist details can be found here Existing code: int _PyRun_SimpleStringFlagsWithName(const char *command, const char* name, PyCompilerFlags *flags) { PyObject *main_module = PyImport_AddModuleRef("__main__"); if (main_module == NULL) { return -1; } PyObject *dict = PyModule_GetDict(main_module); // borrowed ref PyObject *res = NULL; if (name == NULL) { res = PyRun_StringFlags(command, Py_file_input, dict, dict, flags); } else { PyObject* the_name = PyUnicode_FromString(name); if (!the_name) { PyErr_Print(); return -1; } res = _PyRun_StringFlagsWithName(command, the_name, Py_file_input, dict, dict, flags, 0); Py_DECREF(the_name); } Py_DECREF(main_module); if (res == NULL) { PyErr_Print(); return -1; } Py_DECREF(res); return 0; } CPython versions tested on:CPython main branch Operating systems tested on:Windows Linked PRsActivity
MetadataMetadataAssigneesLabelsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |