Skip to content

Regression: disktotalspace() missing on 8.2 reference profile while disk_total_space exists (ext/standard/filestat.c) #17821

Closed

Description

@PurHur

Category

stdlib · php-src-strict · profile gate

Problem

On the default PHP 8.2 reference profile, Zend exposes the legacy alias disktotalspace() whenever disk_total_space() exists. This compiler registers disk_total_space() / diskfreespace() but gates disktotalspace() behind CompilerVersion::supportsDisktotalspace() (8.4+ forward profile only).

Repro Zend 8.2+ VM (2026-07-11)
function_exists('disk_total_space') true true
function_exists('disktotalspace') true false
function_exists('diskfreespace') true true

php-src reference

PHP implementation target

  • lib/CompilerVersion.php — fix supportsDisktotalspace() gate (alias available whenever disk_total_space is; not 8.4-only)
  • ext/standard/Module.php — register disktotalspace on 8.2 profile alongside diskfreespace
  • Mirror alias in JIT/AOT if disk_total_space is already lowered

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_disktotalspace_alias.php'

Done when

  • function_exists('disktotalspace') true on default 8.2 profile; disktotalspace('/') === disk_total_space('/')
  • Compliance .phpt under test/compliance/cases/standard/disktotalspace_alias.phpt
  • php-src-strict; no php-compiler-strict shortcut

Activity

  1. added
    bugSomething isn't working
    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 Jul 11, 2026
  2. PurHur commented on Jul 11, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (issues #17821, #16937, #16925)

  3. PurHur commented on Jul 11, 2026

    @PurHur
    OwnerAuthor

    Merged via #17850. Verification: maintainer_disktotalspace_alias.php → total=yes alias=yes equal=yes; disktotalspace_alias.phpt + CompilerVersionBuiltinAdvertisementTest green; ./script/ci-fast.sh exit 0.

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 machinebugSomething isn't workingenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions