Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 15, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

cmb69 and others added 13 commits December 15, 2024 12:09
This test puts a fake cmd.exe in the CWD and removes it only after the
test has finished.  We need to avoid that other tests are running while
that fake cmd.exe is there, because they may use it instead of the
proper cmd.exe.

We also unlink the fake cmd.exe as soon as possible, regardless of the
test result.

Fixes GH-17098.
Closes GH-17090.
* PHP-8.3:
  Don't run proc_open_cmd.phpt in parallel with other tests
* PHP-8.4:
  Don't run proc_open_cmd.phpt in parallel with other tests
Commit edae243 attempted to fix a leak and double free, but didn't
properly understand what was going on, causing a reference count mistake
and subsequent segfault in this case.

The first mistake of that commit is that the reference count should've
been increased because we're reusing a phar object. The error handling
path should've gotten changed instead to undo this refcount increase
instead of not refcounting at all (root cause of this bug).

The second mistake is that the alias isn't supposed to be transferred or
whatever, that just doesn't make sense. The reason the test
bug69958.phpt originally leaked is because in the non-reuse case we
borrowed the alias and otherwise we own the alias. If we own the alias
the alias information shouldn't get deleted anyway as that would desync
the alias map.

Fixing these will reveal a third issue in which the alias memory is not
always properly in sync with the persistence-ness of the phar, fix this
as well.

Closes GH-17150.
* PHP-8.3:
  Fix GH-17137: Segmentation fault ext/phar/phar.c
* PHP-8.4:
  Fix GH-17137: Segmentation fault ext/phar/phar.c
@pull pull bot added the ⤵️ pull label Dec 15, 2024
@pull pull bot merged commit fa8c6a5 into wudi:master Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants