Skip to content

Commit 68d27b7

Browse files
etrclaude
andcommitted
TASK-038 review cleanup: replace LT_CHECK(true), add comments, rename test
Major fix: replace the no-op `LT_CHECK(true)` in `moved_from_accessors_are_defined` with `LT_ASSERT_NEQ(SBO::body_ptr(dst), static_cast<body*>(nullptr))` so the test has a load-bearing assertion that proves the move destination received the body. Minor fixes applied: - Remove redundant `(void)sink_*` casts that follow volatile assignments (items 13/14) - Add comment on `fat_body::kind()` documenting intentional body_kind mismatch (item 2) - Add comment on `body(std::move(o))` base initializer explaining vptr machinery (item 5) - Add comment explaining why `static_cast<int>` is required for body_kind comparisons (items 6/7) - Shorten the accessor duplication explanation to a one-line cross-reference (items 11/12) - Add clarifying comment on the `SBO` alias (items 18/19) - Add fixture documentation comment in `move_ctor_file_body_inline` (items 10/17/28) - Rename `self_move_assign_public_api_safe` -> `move_assign_self_inline_statePreserved` (item 27) - Condense multi-line CXXFLAGS comment to one-line YAML step comment (items 3/4) - Update specs/tasks/_index.md Last-updated date to 2026-05-27 (item 20) - Clarify "(4-case)" wording in TASK-038.md to mean four total pairings (item 25) - Mark all 28 items in the unworked review issues file (fixed/already-addressed/deferred) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c9c0c28 commit 68d27b7

5 files changed

Lines changed: 108 additions & 54 deletions

File tree

‎.github/workflows/verify-build.yml‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -698,14 +698,9 @@ jobs:
698698
if: ${{ matrix.build-type == 'lint' && matrix.os-type == 'ubuntu' }}
699699

700700
- name: Run libhttpserver configure
701+
# TASK-038: fixed CXXLAGS -> CXXFLAGS typo so C++ TUs are instrumented by the sanitizer matrix.
701702
run: |
702703
# Set memory check flags. They need to stay in step as env variables don't propagate across steps.
703-
# TASK-038: CXXFLAGS (NOT CXXLAGS) is the autoconf-recognized var
704-
# that gets passed to the C++ compiler. A long-standing typo left
705-
# C++ TUs uninstrumented under asan/msan/lsan/tsan/ubsan — the
706-
# runtime libs were linked but the code itself was compiled
707-
# without -fsanitize=..., so the sanitizers were no-ops on the
708-
# library. The fix is a single missing 'F' per line.
709704
if [ "$BUILD_TYPE" = "asan" ]; then export CFLAGS='-fsanitize=address'; export CXXFLAGS='-fsanitize=address'; export LDFLAGS='-fsanitize=address'; fi
710705
if [ "$BUILD_TYPE" = "msan" ]; then export CFLAGS='-fsanitize=memory'; export CXXFLAGS='-fsanitize=memory'; export LDFLAGS='-fsanitize=memory'; fi
711706
if [ "$BUILD_TYPE" = "lsan" ]; then export CFLAGS='-fsanitize=leak'; export CXXFLAGS='-fsanitize=leak'; export LDFLAGS='-fsanitize=leak'; fi

‎specs/tasks/M6-release/TASK-038.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Verify all four `http_response` move cases are sanitizer-clean — the highest-b
1111
- [x] Write `test/unit/http_response_move_sanitizer_test.cpp` covering:
1212
- move-construct: inline source → destination (placement-new path)
1313
- move-construct: heap source → destination (pointer swap path)
14-
- move-assign: inline ↔ inline (4-case)
15-
- move-assign: inline ↔ heap (4-case)
16-
- move-assign: heap ↔ inline (4-case)
17-
- move-assign: heap ↔ heap (4-case)
14+
- move-assign: inline ↔ inline (one test per pairing; "(4-case)" refers to the four total inline/heap pairings collectively)
15+
- move-assign: inline ↔ heap (one test per pairing)
16+
- move-assign: heap ↔ inline (one test per pairing)
17+
- move-assign: heap ↔ heap (one test per pairing)
1818
- [x] Each case constructs an `http_response`, moves it through the operation, and exercises read accessors on the destination + asserts the source is in a valid moved-from state.
1919
- [x] Run under AddressSanitizer + UndefinedBehaviorSanitizer in CI. (Fixed pre-existing `CXXLAGS` -> `CXXFLAGS` typo in `.github/workflows/verify-build.yml` so C++ TUs are actually instrumented under the asan/msan/lsan/tsan/ubsan matrix entries; the runtime libs were linked before but instrumentation was not compiled into the .o files.)
2020
- [x] Add a synthetic body kind that exceeds 64 B (heap-fallback path) to cover the heap branch even if no current production body needs it. (`fat_body` in the new TU, sized to 128 B + counter pointer, placed into a response through the existing `http_response_sbo_test_access` friend hook.)

‎specs/tasks/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# libhttpserver v2.0 — Task Plan
22

33
**Status:** Draft 1
4-
**Last updated:** 2026-05-20
4+
**Last updated:** 2026-05-27
55
**Owner:** Sebastiano Merlino
66
**Inputs:** [specs/product_specs.md](../product_specs.md), [specs/architecture/](../architecture/)
77

0 commit comments

Comments
 (0)