GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `socketmodule.c` does not handle errors on module creation extension-modules · Issue #111253 · python/cpython

socketmodule.c does not handle errors on module creation extension-modules  #111253

New issue
Copy link
New issue
Copy link
Closed
Closed
socketmodule.c does not handle errors on module creation extension-modules #111253
Copy link
Assignees
sobolevn
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Oct 24, 2023
Issue body actions

Bug report

It handles most with a specialized macro:

cpython/Modules/socketmodule.c

Lines 7716 to 7722 in 81eba76

/* Kernel event messages */
#ifdef PF_SYSTEM
ADD_INT_MACRO(m, PF_SYSTEM);
#endif
#ifdef AF_SYSTEM
ADD_INT_MACRO(m, AF_SYSTEM);
#endif

but not these ones:

cpython/Modules/socketmodule.c

Lines 7724 to 7731 in 81eba76

/* FreeBSD divert(4) */
#ifdef PF_DIVERT
PyModule_AddIntMacro(m, PF_DIVERT);
#endif
#ifdef AF_DIVERT
PyModule_AddIntMacro(m, AF_DIVERT);
#endif

Introduced in #96536

Linked PRs

  • gh-111253: Fix socketmodule.c not checking for errors when initializing #111254
  • [3.12] gh-111253: Fix error checking in _socket module init (GH-111254) #111299

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    on Oct 24, 2023
  2. sobolevn
    self-assigned this
    on Oct 24, 2023
  3. sobolevn
    added a commit that references this issue on Oct 24, 2023

    pythongh-111253: Fix socketmodule.c not checking for errors when init…

    63bc51d
  4. erlend-aasland
    added a commit that references this issue on Oct 25, 2023

    gh-111253: Fix error checking in _socket module init (#111254)

    3052c09
  5. miss-islington
    added a commit that references this issue on Oct 25, 2023

    pythongh-111253: Fix error checking in _socket module init (pythonGH-…

    92cc30d
  6. vstinner
    added a commit that references this issue on Nov 1, 2023

    [3.12] gh-111253: Fix error checking in _socket module init (GH-111254)…

    99f0dd8
  7. vstinner commented on Nov 1, 2023

    @vstinner
    vstinner
    on Nov 1, 2023
    Member
    More actions

    Fixed in 3.12 and main branches.

  8. vstinner
    closed this as completedon Nov 1, 2023
  9. aisk
    added a commit that references this issue on Feb 11, 2024

    pythongh-111253: Fix error checking in _socket module init (python#11…

    2b69e40
  10. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-111253: Fix error checking in _socket module init (python#11…

    e146dd9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.