Summary
A recovery sync with roughly 98,000 newly parsed C/C++ files reached 100% and
then exited with:
Failed to sync: Maximum call stack size exceeded
The CLI prints only err.message, so the actual stack was unavailable. Source
inspection points to an unbounded result-array spread in
QueryBuilder.getUnresolvedReferencesByFiles():
const chunkRows = statement.all(...chunk);
rows.push(...chunkRows);
The input path chunk is kept below SQLite's parameter limit (about 900 paths),
but the number of unresolved-reference rows returned for those paths is not
bounded. A dense C/C++ chunk can therefore pass more arguments to
Array.prototype.push than V8 allows.
Suggested direction
Append chunkRows with a loop or bounded slices instead of spreading an
unbounded query result. Separately, please expose a full stack under a debug
flag; message-only CLI errors make it difficult to confirm failures in a
specific large-array boundary.
I am labeling the spread site as the source-level hypothesis because the CLI
discarded the stack. The externally observed failure itself is reproducible
after the same dense changed-file batch.
Summary
A recovery sync with roughly 98,000 newly parsed C/C++ files reached 100% and
then exited with:
The CLI prints only
err.message, so the actual stack was unavailable. Sourceinspection points to an unbounded result-array spread in
QueryBuilder.getUnresolvedReferencesByFiles():The input path chunk is kept below SQLite's parameter limit (about 900 paths),
but the number of unresolved-reference rows returned for those paths is not
bounded. A dense C/C++ chunk can therefore pass more arguments to
Array.prototype.pushthan V8 allows.Suggested direction
Append
chunkRowswith a loop or bounded slices instead of spreading anunbounded query result. Separately, please expose a full stack under a debug
flag; message-only CLI errors make it difficult to confirm failures in a
specific large-array boundary.
I am labeling the spread site as the source-level hypothesis because the CLI
discarded the stack. The externally observed failure itself is reproducible
after the same dense changed-file batch.