Skip to content

Commit d963b9f

Browse files
etrclaude
andcommitted
CI: fix configure breakage — set helgrind history via make CLI var, not Makefile.am
The previous commit added `VALGRIND_helgrind_FLAGS = --history-level=full` right after @VALGRIND_CHECK_RULES@ in test/Makefile.am. That corrupted the generated test/Makefile (config.status "am--depfiles" step hit a "missing separator" at the injected region), so `configure` failed on every platform with "Something went wrong bootstrapping makefile fragments". Reproduced and confirmed fixed locally. Revert the Makefile.am edit and instead pass VALGRIND_helgrind_FLAGS on the `make check-valgrind-<tool>` command line in verify-build.yml. A make command-line assignment overrides the macro's ?= default and propagates to the recursive check-TESTS make, with none of the Makefile.in-generation risk; it is inert for the memcheck/drd tools that don't consume it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NpysYDDJac63yz2mZKKiDf
1 parent d7fc123 commit d963b9f

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/verify-build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,19 @@ jobs:
13941394
run: |
13951395
cd build ;
13961396
TOOL="${BUILD_TYPE#valgrind-}" ;
1397-
make "check-valgrind-${TOOL}" ;
1397+
# Override ax_valgrind_check's --history-level=approx default for
1398+
# helgrind. approx drops the happens-before history, so helgrind can't
1399+
# see the synchronisation MHD_start_daemon()'s pthread_create
1400+
# establishes between the main thread's pre-start setup and the worker
1401+
# threads reading that immutable-after-start state during dispatch,
1402+
# producing a flood of benign "data race" reports on libhttpserver
1403+
# frames whose conflicting access was "the start of the thread". full
1404+
# tracks the complete graph and proves those reads ordered, removing
1405+
# the false positives at the source (no libhttpserver-frame suppression,
1406+
# per DR-008). A make command-line assignment overrides the Makefile's
1407+
# ?= default and propagates to the recursive check-TESTS make; it is
1408+
# inert for the memcheck/drd tools that don't consume it.
1409+
make VALGRIND_helgrind_FLAGS=--history-level=full "check-valgrind-${TOOL}" ;
13981410
if: ${{ startsWith(matrix.build-type, 'valgrind-') }}
13991411

14001412
- name: Print Valgrind results

test/Makefile.am

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -689,19 +689,6 @@ TESTS = $(check_PROGRAMS)
689689
# removed when the umbrella went clean.)
690690

691691
@VALGRIND_CHECK_RULES@
692-
# Override the ax_valgrind_check default (--history-level=approx). `approx`
693-
# drops the full happens-before history, so helgrind cannot see the
694-
# synchronisation that MHD_start_daemon()'s pthread_create establishes
695-
# between the main thread's pre-start setup and the worker threads that read
696-
# that (immutable-after-start) state during dispatch. That produced a flood
697-
# of benign "data race" reports on libhttpserver frames (resolve_method_callback,
698-
# get_allowed_methods, method_set::contains, webserver::get_bound_port, ...)
699-
# whose conflicting access was literally "the start of the thread". `full`
700-
# tracks the complete happens-before graph and correctly proves those reads
701-
# are ordered after setup, eliminating the false positives at the source.
702-
# This assignment follows @VALGRIND_CHECK_RULES@, so it wins over the macro's
703-
# conditional (?=) default.
704-
VALGRIND_helgrind_FLAGS = --history-level=full
705692
# TASK-088: helgrind + drd race-detector suppression files join the shared
706693
# VALGRIND_SUPPRESSIONS_FILES list. Suppression blocks are tool-tagged
707694
# (Memcheck:/Helgrind:/drd:), so each tool ignores blocks meant for another;

0 commit comments

Comments
 (0)