Category
runtime / stdlib
Problem
#3113 landed VM gc_collect_cycles() via lib/VM/CycleCollector.php and ext/standard/gc_collect_cycles.php, but the JIT call() path throws:
LogicException: gc_collect_cycles() is not implemented for JIT in this compiler build
Scripts compiled with bin/jit.php cannot explicitly sweep cyclic object graphs even though VM mode can.
php-src reference
Zend/zend_gc.c — gc_collect_cycles(), zend_gc_collect_cycles()
ext/standard/info.c — PHP_FUNCTION(gc_collect_cycles)
Repro (today)
Use existing compliance fixture:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter gc_collect_cycles'
Expected: VM test passes; JIT test skipped or fails today.
Actual: test/compliance/JITTest.php skips gc_collect_cycles PHPT (#3113 comment).
Minimal script:
<?php
$a = new stdClass();
$b = new stdClass();
$a->b = $b;
$b->a = $a;
unset($a, $b);
echo gc_collect_cycles();
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php repro.php'
Scope (this repo)
ext/standard/gc_collect_cycles.php — implement call() delegating to native bridge
lib/JIT/Builtin/ or runtime symbol calling CycleCollector::collect() with active VM context
test/compliance/cases/runtime/gc_collect_cycles.phpt — enable JIT path (remove JITTest skip)
- Update
docs/capabilities.md JIT column
Done when
Dependencies
Links
Category
runtime/stdlibProblem
#3113 landed VM
gc_collect_cycles()vialib/VM/CycleCollector.phpandext/standard/gc_collect_cycles.php, but the JITcall()path throws:Scripts compiled with
bin/jit.phpcannot explicitly sweep cyclic object graphs even though VM mode can.php-src reference
Zend/zend_gc.c—gc_collect_cycles(),zend_gc_collect_cycles()ext/standard/info.c—PHP_FUNCTION(gc_collect_cycles)Repro (today)
Use existing compliance fixture:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter gc_collect_cycles'Expected: VM test passes; JIT test skipped or fails today.
Actual:
test/compliance/JITTest.phpskipsgc_collect_cyclesPHPT (#3113 comment).Minimal script:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php repro.php'Scope (this repo)
ext/standard/gc_collect_cycles.php— implementcall()delegating to native bridgelib/JIT/Builtin/or runtime symbol callingCycleCollector::collect()with active VM contexttest/compliance/cases/runtime/gc_collect_cycles.phpt— enable JIT path (remove JITTest skip)docs/capabilities.mdJIT columnDone when
bin/jit.php(same as VM)./script/ci-local.sh --filter gc_collect_cyclesgreen (VM + JIT)internal_*stub — real call intoCycleCollectorDependencies
Links