CI: nested module-cache cold execution hits Boehm GC_stop_init MemorySanitizer uninitialized sigaction bytes

Open
#32,766 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
c

Research direction

Start with the failing test vlib/v/gen/c/cached_interface_dispatch_test.v at line 35, whose cold phase compiles io/buffered_writer_test.v in a nested child process. Reproduce that child command with the C output kept, without the parent's -gc none, under -fsanitize=memory, and check where the Boehm GC init path reads uninitialized sigaction bytes. Done means the Clang MemorySanitizer job passes with the fixture still enabled and no warnings suppressed.

Written by the indexing model from the issue text.

Description

Executed failure (not a queued workflow)

Historical master 593657221cd2ef2063d41979a7b827e8cb12ecd5, Clang MemorySanitizer job 137340577538, completed 2026-11-22 23:36:17 UTC. The VLIB suite completed 1,620 passing / 713 skipped / one actual failing test: vlib/v/gen/c/cached_interface_dispatch_test.v:35, cold phase io/buffered_writer_test.v. Spawned child returned 1 with Uninitialized bytes in read_sigaction at offset 0 ..., MemorySanitizer: use-of-uninitialized-value, stack GC_stop_init gc.c -> GC_init -> v_gc_init -> v3_gcboehm_runtime_init -> gc_runtime_init -> _vinit. Parent test command: ./v -cc clang -gc none -d use_bundled_libgc -cflags -fno-omit-frame-pointer -cflags -maes -cflags -mpclmul -cflags -fsanitize=memory -silent vlib/v/gen/c/cached_interface_dispatch_test.v.

Applicability and discriminators

The test is byte-identical between failed 593 and current master (commit 0409a631... latest change). In cached_interface_dispatch_test.v, the nested child compiles with @VEXE -cc clang -cflags -fsanitize=memory, but without the parent -gc none, possibly entering a Boehm GC init path before module-cache assertions execute. Do not automatically discard this as an external-library sanitizer trace. It is distinct from R230 (earlier missing __msan_* link) and R376 (musl SQLite wrong-libc linking). Neither the fixed revision nor matching native instrumentation has passed.

Next investigation

Reproduce the exact nested io/buffered_writer_test.v cold and warm commands with kept C and binary; inspect linked Boehm GC and gc.c:GC_stop_init signal-action initialization under unsuppressed MSan, compare GC mode/instrumentation with parent; check compiler-controlled GC selection and ABI padding; then apply a minimal actual correction preserving cold/warm io/json2/ORM module-cache coverage. Run corrected Clang MSan and Linux GCC/Clang controls. Do not skip this fixture, disable GC indiscriminately, suppress warnings or weaken assertions.

[!NOTE]
You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Dominant language
V
Stars
38.1k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
682

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vlang/v

All issues in vlang/v

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.