[php-src] PR #25773: Fix GH-25772: pg_fetch_object() crashes with JIT when the constructor keeps a reference and the result is discarded

From: Date: Thu, 26 Nov 2026 09:02:38 +0000
Subject: [php-src] PR #25773: Fix GH-25772: pg_fetch_object() crashes with JIT when the constructor keeps a reference and the result is discarded
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41035@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25773 Author: thunderer Fixes GH-25772. pg_fetch_object() calls the constructor on the object it returns, and the constructor can keep a reference to $this. The stub still declared @refcount 1, so function JIT and tracing JIT destroyed the object when the result was discarded, while that reference still used it. This drops the annotation and regenerates the arginfo and optimizer info, as 684612c85b9 did for pg_fetch_all_columns(). The test fails without the change. The merge into PHP-8.5 and PHP-8.6 conflicts only in the stub hash line of ext/pgsql/pgsql_arginfo.h; build/gen_stub.php regenerates it.

« previous php.git-pulls (#41035) next »