Skip to content

fix(c-lsp): guard pending template call resolution#322

Open
romanornr wants to merge 1 commit intoDeusData:mainfrom
romanornr:upstream/c-lsp-template-call-guard
Open

fix(c-lsp): guard pending template call resolution#322
romanornr wants to merge 1 commit intoDeusData:mainfrom
romanornr:upstream/c-lsp-template-call-guard

Conversation

@romanornr
Copy link
Copy Markdown

Summary

  • Add defensive bounds checks while resolving pending C++ template calls
  • Avoid reading past signature parameter arrays when recovery-mode parses produce extra call arguments
  • Add a regression test covering mismatched template call argument counts

Test plan

  • make -f Makefile.cbm test -j$(nproc)

Notes

This was found while indexing a large Bitcoin-derived C++ codebase, where malformed/recovery-mode AST shapes could expose unsafe assumptions in the C/C++ LSP resolver.

@DeusData DeusData added bug Something isn't working stability/performance Server crashes, OOM, hangs, high CPU/memory parsing/quality Graph extraction bugs, false positives, missing edges labels May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges stability/performance Server crashes, OOM, hangs, high CPU/memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants