php / php/php-src

Delaying error handlers

Open
#20,018 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Due to error handlers, some operations may have unsuspected effects. This is the cause of bugs and workarounds. Quoting GH-6903:

[...] long-standing source of interrupt
vulnerabilities: A notice is emitted during execution of an opcode,
resulting in an error handling being run. The error handler modifies
some data structure the opcode is working on, resulting in UAF or
other memory corruption.

These bugs and workarounds could be avoided by delaying error handlers until a safepoint. Existing/Previous work:

I'm creating this ticket to aggregate issues that would not exist with delayed error handlers:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the prior pull requests 6903, 7735, 12090, and 12805, then examine the linked issues aggregated here. The work is complete when error handlers are delayed until a safepoint so the listed interrupt-related bugs and workarounds no longer apply.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.