Compare commits

...
Author SHA1 Message Date
claude[bot]andAbhigyan Patwari bbe2752415 fix: force process.exit(0) after analyze to prevent native addon segfault
After `gitnexus analyze` completes successfully, Node.js can segfault during
process exit when native C++ addon destructors (onnxruntime-node, tree-sitter,
KuzuDB) are called during GC teardown. This is a known issue on Linux with
native addons.

Adding `process.exit(0)` after all work is done bypasses the crashing GC
destructors. The command is fully complete at this point, so there is no
functional difference.

Fixes #38

Co-authored-by: Abhigyan Patwari <abhigyanpatwari@users.noreply.github.com>
2026-02-22 17:50:12 +00:00
+5
View File
@@ -275,4 +275,9 @@ export const analyzeCommand = async (
}
console.log('');
// Force clean exit to prevent segfault from native addon destructors
// (onnxruntime-node, tree-sitter, KuzuDB) crashing during Node.js GC teardown.
// All work is complete at this point, so there is no functional difference.
process.exit(0);
};