Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OPCache with Enum and Callback functions results in segmentation fault #10914

Closed
@miguelantoniosantos

Description

@miguelantoniosantos

Description

The following code:

ExampleEnum.php

<?phpenum ExampleEnum:string{caseFIRST='FIRST_VALUE';}

Trigger.php

<?phpfunctionauxiliarFunction(string$enumEntry) {}functiontriggerException(callable$callback) {$callback();}functionmain() {triggerException(function () {auxiliarFunction(ExampleEnum::FIRST->value);//This will not run and trigger a SIGSEGV - core dumped    });}

This was first spotted on Symfony 5.4 codebase, with a callback of the TagAwareCacheInterface.
If OPCache is disabled, the error doesn't occur.
Replacing the enum with a string variable fixes the issue.

PHP Version

PHP 8.1.11 (fpm-fcgi)

Operating System

Ubuntu 20.04.5 LTS

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp