Skip to content

PyList_SetItem missing atomic store #129643

@kumaraditya303

Description

@kumaraditya303

Bug report

PyList_SetItem currently uses Py_XSETREF to set the item and decref the old one, however the store is not atomic as such it can race with a concurrent read. The fix is to use a atomic store with release order to correctly set the new item and then decref the old object.

cc @colesbury @Yhg1s

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions