Skip to content

[FEATURE] Add sanitizer (ASan/UBSan) CI coverage for index-file deserialization #50

Description

@chishui

Problem

nsparse deserializes binary index files that may be corrupt or truncated. The readers validate defensively, and ~120 negative-path assertions cover that. But those tests only assert an exception is thrown — not that no out-of-bounds read, overflow, or misaligned access happened first. For an in-process native library, a memory error is much worse than an exception. CI builds Release only and runs no sanitizers.

Proposal

  1. Add an ASan+UBSan job over the existing ctest suite (-fsanitize=address,undefined, RelWithDebInfo). UBSan matters as much as ASan here: overflow and misalignment are what binary parsing produces. Open questions: add an NSPARSE_ENABLE_SANITIZERS option? generic-only, or one SIMD build too, for tail-element OOB in vectorized kernels? per-PR or nightly?
  2. Later: a libFuzzer harness over the CSR/mmap readers; tests/csr_interchange_test_util.h already builds such files.

Happy to implement (1).

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions