tree-sitter / tree-sitter-scala

Scala grammar for tree-sitter
MIT License
158 stars 55 forks source link

stack: prevent undefined behavior on int pointers #404

Closed psarna closed 3 months ago

psarna commented 3 months ago

Without proper alignment, UBSAN will cause the program to fail at runtime with "illegal instruction" signal. zig cc toolchain enables UBSAN by default, which helped me pinpoint the cause.

eed3si9n commented 3 months ago

There was a commit https://github.com/tree-sitter/tree-sitter-scala/pull/398/commits/2c5c1d2f86ad9ba9e0604174c9cf06334f54b7fe in #398, which I wonder we should cherry pick instead. see https://github.com/tree-sitter/tree-sitter-scala/pull/405

eed3si9n commented 3 months ago

Closing this in favor of https://github.com/tree-sitter/tree-sitter-scala/pull/405