Skip to content

h_cfgrammar_() leaks memory #182

@puellavulnerata

Description

@puellavulnerata

While valgrinding unit tests and plugging leaks, I found that /core/grammar/end leaks even if I add h_cfgrammar_free(g) to test_end(). The cause is the calls to h_new() (rather than in the grammar's arena) in if (h_hashset_empty(g->nts)) branch of h_cfgrammar_(). Unfortunately, these cannot simply be changed over to h_arena_malloc() calls because the LL(k) backend frees the grammar once it finishes compiling the parser, but apparently keeps some of these pointers around and uses them during parsing. Further investigation proceeding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions