-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed as not planned
Labels
error-recoveryRelated to error recovery mechanismRelated to error recovery mechanism
Description
Problem
Trying to parse this file: https://github.com/AcademySoftwareFoundation/Imath/blob/main/src/Imath/toFloat.h causes stack overflow with the Rust binding, and generates extremely large log on CLI.
The maintainer of the C grammar responded saying that this is expected due to error recovery (tree-sitter/tree-sitter-c#221), but how would I as a user guard against this? Stack overflow is not something that may be caught/recovered.
Steps to reproduce
git clone https://github.com/tree-sitter/tree-sitter-c
cd tree-sitter-c
tree-sitter parse ../Imath/src/Imath/toFloat.h > 1.log
killall -9 tree-sitter
ls -lah 1.log
-rw-rw-r-- 1 user user 1.2G Aug 16 09:45 1.log
Expected behavior
CLI should exit without generating huge amounts of output, the Rust binding should not cause stack overflow.
Tree-sitter version (tree-sitter --version)
ree-sitter 0.22.6
Operating system/version
Ubuntu 22.04
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
error-recoveryRelated to error recovery mechanismRelated to error recovery mechanism