Skip to content

Add a warning about the usage of LIBXML_PARSEHUGE#5647

Merged
jordikroon merged 1 commit into
php:masterfrom
alexandre-daubois:libxml-parsehuge-warning
Jul 2, 2026
Merged

Add a warning about the usage of LIBXML_PARSEHUGE#5647
jordikroon merged 1 commit into
php:masterfrom
alexandre-daubois:libxml-parsehuge-warning

Conversation

@alexandre-daubois

Copy link
Copy Markdown
Member

No description provided.

@alexandre-daubois
alexandre-daubois force-pushed the libxml-parsehuge-warning branch from 777ed90 to 845025f Compare July 2, 2026 14:51
@jordikroon
jordikroon merged commit 77ae1d1 into php:master Jul 2, 2026
2 checks passed
@jordikroon

Copy link
Copy Markdown
Member

Thanks!

@alfsb

alfsb commented Jul 2, 2026

Copy link
Copy Markdown
Member

I do not think this configuration even works, as the build of PHP manual uses it, and yet this script easy hits two different hard limits of libxml.

@ndossche

ndossche commented Jul 2, 2026

Copy link
Copy Markdown
Member

The option works: libxml raises the limits compared to the default when not using PARSEHUGE, but it doesn't set the limit to infinite.

@alfsb

alfsb commented Jul 2, 2026

Copy link
Copy Markdown
Member

It's good that the option works. But it is sad that the manual compilation is arbitrarily near of the breaking point. Alas, I was toying with a userland XML parser that does entity expansion. I will try to complete it, as a spare.

@alfsb

alfsb commented Jul 2, 2026

Copy link
Copy Markdown
Member

In fact, a suggestion. From:

Sets XML_PARSE_HUGE flag, which relaxes any hardcoded limit from the parser.

to

Sets XML_PARSE_HUGE flag, which increases some hardcoded limits from the parser.

English is not my main language, but "relaxes" plus "any" has some connotations to "remove" (for me), whereas "increases" is more certain that the limits still exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants