Skip to content

Fix GH-17145: DOM memory leak #17147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

nielsdos
Copy link
Member

Because the use of RETURN instead of RETVAL, the freeing code could not be executed. This only is triggerable if the content of the attribute is mixed text and entities, so it wasn't noticed earlier.

@nielsdos nielsdos linked an issue Dec 13, 2024 that may be closed by this pull request
echo $attr->value;
?>
--EXPECT--
n&
Copy link
Member

Choose a reason for hiding this comment

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

Looking at CI, is this & difference coming from libxml2 versions ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it :( It seems that the CI jobs using a more recent version of libxml have the correct output while the older versions do not. I'll run a bisect on libxml to see what commit in libxml fixed 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.

This was fixed in GNOME/libxml2@b8597f4, so it's a pretty recent fix and since distros are quite behind on libxml updates, it'll take some time for them to get this fix.
It would be possible to patch this in PHP too, but I'm going for a SKIPIF right now as I don't want to add more workarounds than we already have to be honest...

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really happy about dealing with these kinds of stuff

Because the use of RETURN instead of RETVAL, the freeing code could not
be executed. This only is triggerable if the content of the attribute is
mixed text and entities, so it wasn't noticed earlier.
@nielsdos nielsdos closed this in 4656c22 Dec 14, 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.

DOM memory leak
3 participants