Skip to content

Fix memory leak of token when bison failed to parse SQL #586

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

Merged
merged 1 commit into from
Jul 19, 2025

Conversation

evtrouble
Copy link
Contributor

What problem were solved in this pull request?

When bison fails to parse SQL, memory leaks may occur, such as
select * from t where id><1;
memory leak

Issue Number: close #xxx

Problem:

What is changed and how it works?

In yacc_sql.y, use %destructor to specify the memory release action that needs to be called when parsing fails for the token, in order to prevent memory leaks that may occur in the event of an error.

Other information

@hnwyllmm hnwyllmm merged commit 72aed7a into oceanbase:vldbss-2025 Jul 19, 2025
1 check passed
@evtrouble evtrouble deleted the new_vldbss-2025 branch July 20, 2025 09:38
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.

2 participants