Skip to content
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

fix: gumbo memory leak on abandoned tags #3036

Merged
merged 2 commits into from Nov 21, 2023

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

The fuzzer in #3007 found a memory leak when incomplete tags are encountered.

The repro added to the memory leak test suite is:

<asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf foo="bar

which will leak the tag name without this fix.

cc @stevecheckoway

Have you included adequate test coverage?

Yes, but added it to the memory leak suite which can only be run manually today (see #1603 for context on plans to improve it).

Does this change affect the behavior of either the C or the Java implementations?

No functional change.

minitest-parallel_fork creates new runner processes, so the constant
created using Process.pid is out of date.
Copy link
Contributor

@stevecheckoway stevecheckoway left a comment

Choose a reason for hiding this comment

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

LGTM

@stevecheckoway
Copy link
Contributor

I'm a little surprised this bug is there. It must have been introduced after the last time I fuzzed nokogumbo. I appreciate the work @fuzzy-boiii23a has done here.

@flavorjones flavorjones merged commit fd9f9e1 into main Nov 21, 2023
126 checks passed
@flavorjones flavorjones deleted the flavorjones-gumbo-memory-leak branch November 21, 2023 20:03
@flavorjones
Copy link
Member Author

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.

None yet

2 participants