Skip to content

SIGSEGV in OPCache Preloading when using Typed Class Constants with Closures #21059

@MariusJam

Description

@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

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions