Skip to content

tree.delete() skipped on error path — wrap parse+extract in try/finally #34

Description

@DataDave-Dev

🇪🇸 Español

Entre parser.parse() y tree.delete() hay cuatro compilaciones language.query() y bucles de captura. Si alguno lanza una excepción, nunca se llega a tree.delete() y el árbol WASM se filtra; el request termina en un 500 genérico.

Archivo: src/lib/analysis/analyzers/shared.ts:112-157

Solución sugerida: Envolver el cuerpo en try { ... } finally { tree.delete(); }.


🇬🇧 English

Between parser.parse() and tree.delete() there are four language.query() compilations and capture loops. If any throws, tree.delete() is never reached and the WASM-backed tree leaks; the request fails into a generic 500.

File: src/lib/analysis/analyzers/shared.ts:112-157

Suggested fix: Wrap the body in try { ... } finally { tree.delete(); }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions