Skip to content

Undefined behavior in Py_ABS() macro with LLONG_MIN #141370

@sethmlarson

Description

@sethmlarson

Bug report

Bug description:

When the value passed to Py_ABS() macro is LLONG_MIN (or any min value of a signed integer), the macro suffers from undefined behavior. This was detected in a failure to build the OSS-Fuzz test suite.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions