Comments (3)
Yeah, this working as intended. Like @amaanq, Tree-sitter aborts on allocation failure (unless you explicitly override that allocation behavior). Attempting to recover from allocation failure is explicitly not something we plan to do. For most codebases, attempting to do that correctly is a SEGV waiting to happen.
from tree-sitter.
There is a check if the default ts allocator is used (which the cli does or if you specify -DTREE_SITTER_REUSE_ALLOCATOR) -
Line 5 in 8b28443
If you are opting out of the ts allocator, then whatever the user supplies is used, or just the function itself if not.
from tree-sitter.
Is it the intention that grammars should be complied with -DTREE_SITTER_REUSE_ALLOCATOR
by default? None of the bindings seem to do that, so we already have SIGSEGV pending on OOM in all bindings.
At the very least I think the fallback implementations based on libc should also abort on failures.
from tree-sitter.
Related Issues (20)
- centralized "version" number in config HOT 1
- generate should not create .editorconfig (et al.), that should be part of an init command HOT 2
- Should the `.gitattributes` template use `text=auto`? HOT 2
- error[E0463]: can't find crate for `thiserror_impl` HOT 6
- `ts_node_field_name_for_child()` can incorrectly assign field names to `extras` HOT 1
- Alias not queriable HOT 3
- `ts_node_is_missing()` fails if missing node wraps hidden rules
- ts_highlighter_add_language CAPI and Rust Implementation signature mismatch HOT 1
- `setTimeoutMicros` doesn't appear to work in the latest versions of `web-tree-sitter` HOT 2
- Rust bindings build script accesses `CARGO_MANIFEST_DIR` at compile time instead of run time
- fails to compile with ld from msys2/mingw with `features = ["wasm"]` HOT 1
- Split tree_sitter_cli::generate off into its own crate
- Segfault when using hardened memory allocator HOT 1
- Support negative/error syntax corpus tests HOT 3
- rust api: recursivly print tree via Debug trait if alternate flag is set HOT 7
- zig no longer works for builds in main branch of nvim-treesitter HOT 2
- Playground in offline mode HOT 4
- Don't minify tree-sitter.js HOT 1
- Support nostd HOT 5
- Swift package template dependencies HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tree-sitter.