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

Prevent double-free when y is in array t #182

Closed
wants to merge 1 commit into from

Conversation

AtariDreams
Copy link
Contributor

The code already accounts for when y is in frp->args, but not when it is in frp->args->csub. This PR changes that by adding a function that frees while checking to see if y was found in the array and subsequently freed.

The code already accounts for when y is in frp->args, but not when it is in frp->args->csub. This PR changes that by adding a function that frees while checking to see if y was found in the array and subsequently freed.
@plan9
Copy link
Collaborator

plan9 commented Sep 9, 2023

we will not be introducing new code at this point. we may revisit this issue.

@plan9 plan9 closed this Sep 9, 2023
@millert
Copy link
Contributor

millert commented Sep 21, 2023

This is still an issue and results in a use-after-free under both valgrind and -fsanitize=address when awk is given the following input from T.misc:

BEGIN { unireghf() }
function unireghf(hfeed) { hfeed[1] = 0 }

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

3 participants