Skip to content

Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module #87298

Closed

Description

@ZackerySpytz
BPO 43132
Nosy @serhiy-storchaka, @pganssle, @ZackerySpytz, @miss-islington
PRs
  • bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo #24450
  • [3.9] bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450) #24457
  • gh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo #24829
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-02-04.23:48:01.917>
    labels = ['extension-modules', 'type-bug', '3.9', '3.10']
    title = 'Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module'
    updated_at = <Date 2021-03-11.22:56:35.067>
    user = 'https://github.com/ZackerySpytz'

    bugs.python.org fields:

    activity = <Date 2021-03-11.22:56:35.067>
    actor = 'ZackerySpytz'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2021-02-04.23:48:01.917>
    creator = 'ZackerySpytz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43132
    keywords = ['patch']
    message_count = 6.0
    messages = ['386503', '386517', '386531', '386535', '386548', '386590']
    nosy_count = 4.0
    nosy_names = ['serhiy.storchaka', 'p-ganssle', 'ZackerySpytz', 'miss-islington']
    pr_nums = ['24450', '24457', '24829']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43132'
    versions = ['Python 3.9', 'Python 3.10']

    Linked PRs

    Activity

    1. ZackerySpytz commented on Feb 4, 2021

      ZackerySpytzmannequin
      MannequinAuthor

      PyObject_RichCompareBool() returns -1 on error, but this case is not handled
      by the find_in_strong_cache() function.

    2. serhiy-storchaka commented on Feb 5, 2021

      @serhiy-storchaka
      Member

      New changeset effaec0 by Zackery Spytz in branch 'master':
      bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450)
      effaec0

    3. serhiy-storchaka commented on Feb 5, 2021

      @serhiy-storchaka
      Member

      New changeset c8b4375 by Miss Islington (bot) in branch '3.9':
      bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450) (GH-24457)
      c8b4375

    4. pganssle commented on Feb 5, 2021

      @pganssle
      Member

      Re-opening because this was merged without tests.

      @ZackerySpytz would you mind adding tests to hit these error cases? I've spent some time satisfying myself that it's indeed possible, and I've detailed a general outline here: #24450 (comment)

    5. 15 remaining items

    6. added
      testsTests in the Lib/test dir
      and removed
      3.12only security fixes
      3.13only security fixes
      on Jun 29, 2025
    7. added a commit that references this issue on Jul 1, 2025
    8. added 2 commits that reference this issue on Jul 1, 2025
    9. added 2 commits that reference this issue on Jul 1, 2025
    10. added a commit that references this issue on Jul 11, 2025
    11. added a commit that references this issue on Jul 12, 2025
    12. added a commit that references this issue on Jul 13, 2025
    13. added a commit that references this issue on Aug 4, 2025
    14. added a commit that references this issue on Aug 19, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      extension-modulesC modules in the Modules dirtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions