Skip to content

Fix JSGF memory errors#470

Open
dhdaines wants to merge 8 commits intomainfrom
fix_jsgf_memory_errors
Open

Fix JSGF memory errors#470
dhdaines wants to merge 8 commits intomainfrom
fix_jsgf_memory_errors

Conversation

@dhdaines
Copy link
Copy Markdown
Contributor

@dhdaines dhdaines commented May 2, 2026

Once upon a time, a young graduate student (who had not taken a compiler course previously) found a reason to use Bison and Flex, and was very proud of himself for having done so.

Unfortunately he also forgot to free some memory in various error handling conditions, which, as noted in the Bison documentation, is not one of the many applications where memory leaks are quite acceptable (you will not be surprised that this pearl of wisdom originates with the designer of C++).

So free that memory (tested with valgrind, but not all of the conditions are easy to trigger...)

Fixes: #465

@dhdaines
Copy link
Copy Markdown
Contributor Author

dhdaines commented May 3, 2026

Confirmed fixes #465

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

JSGF parser leaks memory whenever it fails to parse malformed input

1 participant