8000 Potential integer overflow in instrumentation.c · Issue #135177 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Potential integer overflow in instrumentation.c #135177
Open
@rialbat

Description

@rialbat

The arithmetic expression to * (int)sizeof(_Py_CODEUNIT) can overflow if the number of instructions in a function exceeds MAX_INT / 2, as to represents the instruction offset and sizeof(_Py_CODEUNIT) is 2.

PyObject *to_obj = PyLong_FromLong(to * (int)sizeof(_Py_CODEUNIT));

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-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

      0