GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — AF_VSOCK sockets reject buffered SOL_SOCKET options · Issue #161657 · python/cpython Open 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 DescriptionBug report
The following reproducer uses an owned, unconnected Unix socket FD to exercise the Python family dispatch. It does not require a VSOCK device, a VM, or a connection: import socket import struct with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as raw: linger = struct.pack('ii', 1, 0) raw.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, linger) with socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM, 0, fileno=raw.detach()) as sock: for operation in ('get', 'set'): try: if operation == 'get': result = sock.getsockopt(socket.SOL_SOCKET, socket.SO_LINGER, len(linger)) else: result = sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, linger) print(operation, repr(result)) except (OSError, TypeError) as error: print(operation, f'{type(error).__name__}: {error}') On Python 3.15.0: On a debug build of main at The expected result is the packed linger value for get and This is separate from #159561 and its merged PR #159610, which removed a redundant type check without changing the option-level dispatch. I have a focused fix and regression test ready. CPython versions tested on:3.15, 3.16, CPython main branch Operating systems tested on:Linux This report and the proposed fix were prepared with AI assistance. Linked PRsActivity
MetadataMetadataAssigneesLabelsextension-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 ProjectsMilestoneRelationshipsDevelopmentIssue 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. |