Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/php-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: nielsdos/php-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix-17736
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 10 files changed
  • 1 contributor

Commits on Feb 23, 2025

  1. Fix GH-17736: Assertion failure zend_reference_destroy()

    The cache slot for FETCH_OBJ_W in function `test` is primed with the
    class for C. The next call uses a simplexml instance and reuses the same
    cache slot. simplexml's get_property_ptr handler does not use the cache
    slot, so the old values remain in the cache slot. When
    `zend_handle_fetch_obj_flags` is called this is not guarded by a check
    for the class entry. So we end up using the prop_info from the property
    C::$a instead of the simplexml property.
    
    This patch adds a check for the class entry. I placed the check as late
    as possible to avoid as much overhead as possible.
    An alternative solution is to write NULLs to the cache slot in the
    get_property_ptr handlers of extensions that don't use the cache slot,
    but that is not general: not only simplexml would need changes, maybe
    even third party extensions would need changes as well.
    nielsdos committed Feb 23, 2025
    Configuration menu
    Copy the full SHA
    de4f7df View commit details
    Browse the repository at this point in the history
  2. Also fix JIT

    nielsdos committed Feb 23, 2025
    Configuration menu
    Copy the full SHA
    81f1465 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf858a8 View commit details
    Browse the repository at this point in the history
  4. Clear cache slots

    nielsdos committed Feb 23, 2025
    Configuration menu
    Copy the full SHA
    d26a678 View commit details
    Browse the repository at this point in the history
Loading