[php-src] Issue #21059: SIGSEGV in OPCache Preloading when using Typed Class Constants with Closures

[email protected] (MariusJam)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/21059
Author: MariusJam

### Description

Hello,

A Segmentation Fault occurs when an OPCache preloaded class contains a typed constant assigned to a Closure.

I have made a reproducer : https://github.com/MariusJam/opcache-crash-const-closure-reproducer

Please note that I am not familiar with C debugging. I relied on AI assistance to get and interpret the strace logs and create this minimal reproducer.




### PHP Version

```plain
PHP 8.5.2 (cli) (built: Jan 16 2026 23:16:53) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.5.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.2, Copyright (c), by Zend Technologies
```

### Operating System

Alpine or Debian (Docker)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.