Skip to content

scanner: remove erroneous array_delete on const parameter#143

Merged
ahelwer merged 1 commit intotlaplus-community:mainfrom
amaanq:fix-const-array-delete
Feb 17, 2026
Merged

scanner: remove erroneous array_delete on const parameter#143
ahelwer merged 1 commit intotlaplus-community:mainfrom
amaanq:fix-const-array-delete

Conversation

@amaanq
Copy link
Copy Markdown
Contributor

@amaanq amaanq commented Feb 8, 2026

Ref: https://github.com/tree-sitter/tree-sitter/actions/runs/21795611628/job/62882578559?pr=5309#step:10:252

The old array_delete macro silently stripped the const qualifier, but the change in tree-sitter/tree-sitter#5309 expands the macro to also set the contents to NULL, which the compiler rejects. Also, the caller already calls array_delete after parse_proof_step_id returns, so this was technically a double-free with no side effects as the contents were already set to NULL.

@clason
Copy link
Copy Markdown
Contributor

clason commented Feb 8, 2026

@ahelwer (the parser fails to generate on the latest tree-sitter master without this patch).

@clason
Copy link
Copy Markdown
Contributor

clason commented Feb 17, 2026

@ahelwer friendly ping; this is blocking upstream CI, so this would be great to get in sooner rather than later.

@ahelwer ahelwer merged commit add4081 into tlaplus-community:main Feb 17, 2026
3 checks passed
@ahelwer
Copy link
Copy Markdown
Contributor

ahelwer commented Feb 17, 2026

Thanks! Sorry for the wait.

@clason
Copy link
Copy Markdown
Contributor

clason commented Feb 17, 2026

No worries, and thank you!

@amaanq
Copy link
Copy Markdown
Contributor Author

amaanq commented Feb 17, 2026

thank you!

@amaanq amaanq deleted the fix-const-array-delete branch February 17, 2026 17:21
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.

3 participants