Skip to content

Conversation

@nielsdos
Copy link
Member

Bailouts are bad because they stop the GC etc. They also hide leaks. This makes the behaviour equivalent to exit(), as it's meant to stop the request (which is why bailout was used).

We also have to fix some leaks that pop up then.

This partially depends on @Girgias refactor, so draft until then and will rebase after that is merged.

Bailouts are bad because they stop the GC etc. They also hide leaks.
This makes the behaviour equivalent to exit(), as it's meant to stop
the request (which is why bailout was used).

We also have to fix some leaks that pop up then.
@nielsdos nielsdos marked this pull request as ready for review October 16, 2025 20:54
@nielsdos nielsdos force-pushed the phar-webphar-bailouts branch from c97eb45 to f35c96e Compare October 16, 2025 20:54
switch (Z_TYPE(retval)) {
case IS_STRING:
efree(entry);
/* TODO: avoid relocation??? */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got some refactoring that will avoid this. We are kinda stepping on each other's toes, but I'm happy to rework my local changes on top of this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I had to add the dtor here below for the leak fix and that's how I noticed this.
I'll merge this and let you rebase then.

@nielsdos nielsdos merged commit fbac7a3 into php:master Oct 16, 2025
9 of 10 checks passed
nielsdos added a commit to nielsdos/php-src that referenced this pull request Oct 16, 2025
nielsdos added a commit to nielsdos/php-src that referenced this pull request Oct 16, 2025
nielsdos added a commit to nielsdos/php-src that referenced this pull request Oct 16, 2025
nielsdos added a commit that referenced this pull request Oct 17, 2025
* phar: Get rid of last bailouts in phar_file_action()

Follow-up on GH-20190.

* [ci skip] Drop wrong comment
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.

2 participants