php-src/.github/workflows
Niels Dossche 00c6d538ab
Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846)
* Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c

ssa_op can be NULL in function JIT. Doing pointer arithmetic on a NULL
pointer is undefined behaviour. Undefined behaviour can be dangerous
because the optimizer may assume then that the variable is not actually
NULL.

To solve this:
1. Add ADVANCE_SSA_OP() to safely add an offset to ssa_op in zend_jit.c
2. For inference, add an extra offset argument to the helper functions.

To reproduce this, use Clang (not GCC) on a test like
sapi/cli/tests/gh12363.phpt (or other tests also work).

* Remove -fno-sanitize=pointer-overflow flag from CI

* Fix NULL pointer offsets added to the stack_map

* Fix an offset add on a potentially NULL ssa->ops

* Fix NULL pointer arithmetic in zend_range_info()

* Address review comments
2024-04-01 13:37:15 +02:00
..
close-needs-feedback.yml Harden GitHub Workflows security 2022-08-30 17:59:58 +02:00
close-stale-feature-requests.yml GitHub Actions: Update action versions to avoid node:16 warnings (#13453) 2024-02-21 13:16:25 +01:00
close-stale-prs.yml GitHub Actions: Update action versions to avoid node:16 warnings (#13453) 2024-02-21 13:16:25 +01:00
docs.yml [skip ci] Fix docs glob pattern 2024-02-18 20:39:00 +01:00
labeler.yml GitHub Actions: Update action versions to avoid node:16 warnings (#13453) 2024-02-21 13:16:25 +01:00
nightly.yml [skip ci] Skip JIT tests for Apple Silicon + ZTS 2024-02-18 00:19:47 +01:00
push.yml Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846) 2024-04-01 13:37:15 +02:00
remove-needs-feedback.yml Harden GitHub Workflows security 2022-08-30 17:59:58 +02:00