mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
fix(parser): use alias-safe Haskell arrays
Preload the shared Tree-sitter array helpers before the pinned Haskell scanner so optimized builds do not retain a stale contents pointer across realloc. Keep a compile-time signature guard to prevent regression. Fixes #1231 Signed-off-by: wargloom <wargloom@gmail.com>
This commit is contained in:
1 parent
5e7d3eb77e
commit
4e8eed19f9
1 file changed
+4
@@ -1,4 +1,8 @@
|
||||
// Vendored tree-sitter grammar: haskell
|
||||
// Each grammar compiled as separate unit (conflicting static symbols).
|
||||
#include "vendored/common/tree_sitter/array.h" // strict-aliasing-safe helpers (tree-sitter#5242)
|
||||
typedef void *(*cbm_haskell_array_grow_fn)(void *, uint32_t, uint32_t *, uint32_t, size_t);
|
||||
_Static_assert(_Generic(&_array__grow, cbm_haskell_array_grow_fn: 1, default: 0),
|
||||
"Haskell scanner requires strict-aliasing-safe array helpers");
|
||||
#include "vendored/grammars/haskell/parser.c"
|
||||
#include "vendored/grammars/haskell/scanner.c"
|
||||
Reference in new issue
Block a user