Skip to content

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

Closed

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)

Activity

  1. added a commit that references this issue on Jan 28, 2026
    7507da4
  2. iluuu1994 commented on Jan 28, 2026

    @iluuu1994
    Member

    Nice reproducer, thanks @MariusJam!

  3. added a commit that references this issue on Jan 29, 2026
    2f2b421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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