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 — useless `AF_VSOCK` `setsockopt` validation code · Issue #159561 · python/cpython

useless AF_VSOCK setsockopt validation code #159561

New issue
Copy link
New issue
Copy link
Closed
#159610
Closed
useless AF_VSOCK setsockopt validation code#159561
#159610
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@benjaminp
benjaminp
opened on Oct 16, 2026
Issue body actions

Consider:

cpython/Modules/socketmodule.c

Lines 3423 to 3427 in d3ada45

if (!PyIndex_Check(optval)) {
PyErr_Format(PyExc_TypeError,
"setsockopt() argument 3 for AF_VSOCK must be an int (got %T)",
optval);
}

This sets an error, but doesn't return, so the code falls through to parsing optval anyway.

Linked PRs

  • gh-159561: Remove redundant type check in AF_VSOCK setsockopt() #159610
Reacted by .

Activity

  1. picnixz
    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
    topic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modules
    on Oct 16, 2026
  2. benjaminp
    added a commit that references this issue on Oct 18, 2026

    fixes gh-159561: Remove redundant type check in AF_VSOCK setsockopt() (…

    This issue will close once commit 03a3f3d is merged into the 'main' branch.
    03a3f3d
  3. benjaminp
    closed this as completedin #159610on Oct 18, 2026
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 dirC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-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.