Delaying error handlers
Nobody has claimed this yet.
- 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:
- https://github.com/php/php-src/pull/6903
- https://github.com/php/php-src/pull/7735
- https://github.com/php/php-src/pull/12090
- https://github.com/php/php-src/pull/12805
I'm creating this ticket to aggregate issues that would not exist with delayed error handlers:
- https://github.com/php/php-src/issues/13754
- https://github.com/php/php-src/issues/15907
- https://github.com/php/php-src/issues/16726
- https://github.com/php/php-src/issues/17416
- https://github.com/php/php-src/issues/18043
- https://github.com/php/php-src/issues/18274
- https://github.com/php/php-src/issues/20042
- https://github.com/php/php-src/issues/20482
- https://github.com/php/php-src/issues/20855
- https://github.com/php/php-src/issues/21024
- https://github.com/php/php-src/issues/21245
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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