Skip to content

Segmentation fault when running codebase-memory-mcp cli index_repository on dhw/xx_hash.h #355

Closed

Description

@lilisir0722-crypto

level=info msg=parallel.extract.file.start pos=20 size_kb=63 path=dhw/xx_hash.h
[1] 91222 segmentation fault codebase-memory-mcp cli index_repository

Activity

  1. DeusData commented on May 30, 2026

    @DeusData
    Owner

    Thanks for the report. I tried to reproduce this and couldn't with the headers available to me: I added a regression guard that runs the vendored xxhash.h (~7,500 lines, same macro-dense family as xx_hash.h) through C extraction under AddressSanitizer, and it extracts cleanly on current main.

    Since your report, several C/C++ extraction crash fixes have landed (NULL-terminated param_types OOB #322, an expression-eval step budget #323, and template-substitution NULL handling #360), so this class of segfault is likely already resolved.

    Could you help confirm?

    1. Does the crash still reproduce on the latest build (v0.7.0 / current main)?
    2. If yes, could you attach (or link) the exact dhw/xx_hash.h that crashes? With the file I can add a precise regression test and fix the specific path.

    I'll keep this open pending your reply. 🙏

  2. DeusData commented on May 31, 2026

    @DeusData
    Owner

    Thanks for the report — the segfault was in C extraction of a heavily-macro'd header (dhw/xx_hash.h), which is the same crash family fixed by the C-LSP hardening that landed for v0.7.0:

    Your exact dhw/xx_hash.h isn't public, so I added a proxy regression test (clsp_nocrash_issue355_xxhash_header, commit ba49137) that drives the vendored xxhash header (~7.5k lines, same macro-dense family) through cbm_extract_file and asserts no crash. It passes on v0.7.0.

    Given the fixes target exactly this crash class and the representative macro-dense header now extracts cleanly, I'm closing this as resolved in v0.7.0. If your specific dhw/xx_hash.h still segfaults on v0.7.0, please reopen and attach the file (or a minimal reduction) — I'll add it as a direct regression test and dig in. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstability/performanceServer crashes, OOM, hangs, high CPU/memory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions