Skip to content

Stdlib: socket_atmark() — TCP urgent-data OOB probe missing (ext/sockets/sockets.c) #6544

Closed

Description

@PurHur

Category

stdlib

Problem

socket_atmark() (PHP 8.0+) reports whether the next received byte is out-of-band / at the TCP urgent mark. It is registered in php-src ext/sockets but missing here — function_exists('socket_atmark') is false on bin/vm.php.

Distinct from ancillary-data helpers tracked in #6333 (socket_sendmsg / socket_recvmsg / socket_cmsg_space).

php-src reference

Repro (failure today)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "var_export(function_exists(\"socket_atmark\"));"'

Observed: false.

Zend PHP 8.4: true when ext/sockets is loaded.

Scope (this repo)

Builtin Path Notes
socket_atmark new ext/sockets/socket_atmark.php + Module.php Thin wrapper over SIOCATMARK / platform equivalent via existing socket resource handle
JIT lib/JIT/Builtin/ or VM-only initially Document in capability matrix

Implement in ext/ + VM lowering; avoid new logic in runtime/*.c except unavoidable socket ABI.

Verification

Related

Done when

Strictness

php-src-strict — match PHP_FUNCTION(socket_atmark) in php-src ext/sockets/sockets.c.

Activity

  1. added
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jun 6, 2026
  2. PurHur commented on Jun 11, 2026

    @PurHur
    OwnerAuthor

    claim: cursor-agent lane-B — starting this run

  3. PurHur commented on Jun 11, 2026

    @PurHur
    OwnerAuthor

    Merged via #7995

    Verification

    • Issue repro: function_exists('socket_atmark') → true on bin/vm.php
    • Compliance: vendor/bin/phpunit test/compliance/VMTest.php --filter socket_atmark → OK (1 test)
    • Capability matrix updated (socket_atmark / socket_import_stream VM-only)

    Implementation

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

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web apps

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions