Skip to content

fix(scanner): correct UB in nested_scan#142

Merged
ahelwer merged 1 commit intotlaplus-community:mainfrom
WillLillis:scanner_undef
Jan 23, 2026
Merged

fix(scanner): correct UB in nested_scan#142
ahelwer merged 1 commit intotlaplus-community:mainfrom
WillLillis:scanner_undef

Conversation

@WillLillis
Copy link
Copy Markdown
Contributor

We're addressing some strict aliasing violations in the Array implementation upstream (see tree-sitter/tree-sitter#5242). The changes in that PR lead a to crash in the scanner, as taking the address of a non-lvalue is undefined behavior. This change works with the repo's current array.h header as well as with the changes in tree-sitter/tree-sitter#5242 (which should be in a tagged release soon-ish).

@clason
Copy link
Copy Markdown
Contributor

clason commented Jan 23, 2026

@ahelwer

@ahelwer ahelwer merged commit 8d749f9 into tlaplus-community:main Jan 23, 2026
3 checks passed
@ahelwer
Copy link
Copy Markdown
Contributor

ahelwer commented Jan 23, 2026

Thanks!

@WillLillis WillLillis deleted the scanner_undef branch January 23, 2026 20:53
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