Skip to content

Crash on out of memory #24584

Closed as not planned
Closed as not planned

Description

@DemiMarie

Description

php2shell was a consequence of PHP trying to recover from out of memory. An alternative approach, which is likely much simpler to maintain, is to not even attempt to recover. Instead, treat OOM as fatal and call _exit or abort, terminating the process. The supervisor can then restart it.

Activity

  1. Krishmal2004 commented on Oct 23, 2026

    @Krishmal2004

    @DemiMarie can you assign this issue

  2. DemiMarie commented on Oct 23, 2026

    @DemiMarie
    Author

    @Krishmal2004 assign to whom? I’m a security researcher, not a PHP core developer.

  3. ndossche commented on Oct 23, 2026

    @ndossche
    Member

    php2shell was a consequence of PHP trying to recover from out of memory.

    This is a bit of an oversimplification.

    An alternative approach, which is likely much simpler to maintain, is to not even attempt to recover. Instead, treat OOM as fatal and call _exit or abort, terminating the process.

    This is not acceptable for environments like ZTS. The current behaviour was chosen deliberately.

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