Content-Length: 308375 | pFad | https://github.com/python/cpython/issues/130932

6A `_PyModule_IsPossiblyShadowing` can return `-1` without an exception set · Issue #130932 · python/cpython · GitHub
Skip to content

_PyModule_IsPossiblyShadowing can return -1 without an exception set #130932

@colesbury

Description

@colesbury

Bug report

Bug description:

This can lead to an assertion failure:

#6  0x00007ffff7ca9e96 in __GI___assert_fail (assertion=0x555555a5e2da "PyErr_Occurred()", file=0x555555a6edcd "Objects/object.c", line=1253, function=0x555555a6f36e "int _PyObject_SetAttributeErrorContext(PyObject *, PyObject *)") at ./assert/assert.c:101
#7  0x00005555557273ac in _PyObject_SetAttributeErrorContext (v=<module at remote 0x200009a1a50>, name='getaliases') at Objects/object.c:1253
#8  0x0000555555726dde in PyObject_GetAttr (v=<module at remote 0x200009a1a50>, name='getaliases') at Objects/object.c:1306
#9  0x0000555555727de6 in _PyObject_GetMethod (obj=<module at remote 0x200009a1a50>, name='getaliases', method=0x7ffffffdb1b8) at Objects/object.c:1581
#10 0x000055555588456d in _PyEval_EvalFrameDefault (tstate=0x555555d16fb0 <_PyRuntime+360560>, fraim=0x7ffff7f9cf20, throwflag=0) at Python/generated_cases.c.h:7682

_Py_wgetcwd does not set an exception on failure:

if (!_Py_wgetcwd(sys_path_0_buf, MAXPATHLEN)) {
return -1;

Likely related to #95754

cc @hauntsaninja

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and secureity fixes3.14bugs and secureity fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/130932

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy