You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
probe symbols/query silently drops entire files on #ifdef-heavy C (0 functions for acls.c, checksum.c, etc.) #577
probe symbols and probe query silently return zero functions for C files with heavy #ifdef preprocessor directives — despite those files containing 12-39 function definitions each. No error or warning is emitted.
Reproduction
# These 5 production files all return 0 functions:forfin checksum.c acls.c compat.c hlink.c xattrs.c;do
count=$(probe symbols --format json "$f"| python3 -c "import sys,jsonprint(sum(1 for x in json.load(sys.stdin) if x.get('kind')=='function'))"2>/dev/null)echo"$f: probe=$count functions"done
Expected
Each file should return its actual function definitions (verified by ground-truth regex):
File
probe finds
Actual function defs
checksum.c
0
14
acls.c
0
39
compat.c
0
18
hlink.c
0
12
xattrs.c
0
28
Total missed
0
111
Actual
All 5 files return 0 functions — silently. No error, no warning.
Root cause (preliminary)
The tree-sitter C parser appears to bail after the leading extern/declaration block when it hits heavy #ifdef directives inside struct initializers or tables (e.g. checksum.c:52 has valid_checksums_items[] with #ifdef guards inside the array initializer). After the parse failure, probe symbols emits only the pre-failure declarations and silently stops.
probe query shares the same tree-sitter parser, so it has the same failure — it's not a fallback.
Impact
Critical for proof's function-enumeration use cases (e.g. property-based-test coverage checks). 111 function definitions silently missed across 5 production files. A "0 functions" result must be treated as a hard error, not "empty file" — otherwise coverage gaps are masked.
Activity