Files
codebase-memory-mcp/test-infrastructure/Dockerfile
T
Martin Vogel a1d849aaaa Fix all memory leaks, vendor sqlite3, add Docker test infrastructure
Leak fixes (13 sources, 1.4MB → 0 bytes):
- Cypher: free col_names after rb_set_columns, free rejected inline
  prop nodes, store WITH aliases in qualified_name for auto-cleanup
- Store: add cbm_project_free_fields, fix find_node_ids_by_qns leak
- Graph buffer: free strdup'd hash keys during delete operations
- SQL scanner: free old start_tag before reassignment in deserialize

Platform independence:
- Vendor sqlite3 amalgamation (3.49.1) — eliminates system libsqlite3
  dependency, enables full ASan/LeakSanitizer instrumentation
- Add -I for vendored tree-sitter unicode headers — eliminates hidden
  dependency on system libicu-dev
- Add test-infrastructure/ with Docker Compose for local GCC+ASan
  testing that mirrors CI exactly
2026-03-18 16:28:27 +01:00

23 lines
740 B
Docker

# Mirrors the Ubuntu CI environment exactly:
# - Ubuntu 24.04 (same as GitHub Actions ubuntu-latest / ubuntu-24.04-arm)
# - GCC (system default) with ASan + UBSan + LeakSanitizer
# - libsqlite3-dev + zlib1g-dev (same as CI "Install deps" step)
#
# Build: docker build -t cbm-test test-infrastructure/
# Run: docker run --rm -v $(pwd):/src cbm-test
FROM ubuntu:noble
# Minimal: gcc + zlib only. sqlite3 is vendored (compiled from source with ASan).
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ make \
zlib1g-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
# Default: run test.sh with GCC (mirrors CI exactly)
ENTRYPOINT ["scripts/test.sh"]
CMD ["CC=gcc", "CXX=g++"]