Skip to content

Conversation

@will-cppa
Copy link

@will-cppa will-cppa commented Jan 15, 2026

Summary

  • Multiple fixes to enable B2 build system to find and run tests

Latest Fix

Added project name /boost/capy/test to test/Jamfile so B2 can discover the test target via libs/capy/test.

Problem

B2 builds were failing with:

don't know how to make <e>libs/capy/test
...can't find 1 target...

Note on CMake test failures

The CMake coverage build shows 2 test failures (boost.capy.task and boost.capy.when_all) with "pure virtual method called" errors. This appears to be a separate issue in the production code related to coroutine frame allocator lifetime management, not addressed in this fix.

🤖 Generated with Claude Code

SLODD Bot and others added 3 commits January 15, 2026 16:08
The B2 build system could not find libs/capy/test because
there was no root Jamfile to delegate to build and test
subprojects.

Co-Authored-By: Claude <[email protected]>
Replace hardcoded libs/capy paths with ${GITHUB_REPOSITORY#*/} or
steps.patch.outputs.module to support repositories that are forks
or have different names.

Co-Authored-By: Claude <[email protected]>
The c20-requires constant was undefined in test/unit/Jamfile,
causing B2 to fail with 'don't know how to make <e>libs/capy/test'.
Added import of config:requires and replaced $(c20-requires) with
the direct [ requires cxx20_hdr_concepts ] call.

Co-Authored-By: Claude <[email protected]>
@will-cppa
Copy link
Author

SLODD Iteration 3 Fix

Added fix for undefined c20-requires variable in test/unit/Jamfile.

Changes:

  • Imported config : requires module
  • Replaced $(c20-requires) with direct [ requires cxx20_hdr_concepts ] call

The B2 build was failing because c20-requires was defined in build/Jamfile but used in test/unit/Jamfile where it wasn't accessible.

🤖 Generated with SLODD

SLODD Bot and others added 2 commits January 15, 2026 17:23
Changed BOOST_RUNTIME_SERVICES_BOOSTDEP to BOOST_CAPY_BOOSTDEP so
the URL dependency is detected and cloned by the CI workflow.

Co-Authored-By: Claude <[email protected]>
B2 could not find the test target due to missing project declaration.
Added minimal `project ;` to allow B2 to recognize the test directory.

Co-Authored-By: Claude <[email protected]>
@will-cppa
Copy link
Author

Additional Fix (Iteration 5)

Added missing project ; declaration to test/Jamfile.

Error being fixed:

don't know how to make <e>libs/capy/test

Root cause: The test/Jamfile only had build-project unit ; without a project ; declaration, so B2 couldn't recognize it as a valid project directory.

Fix: Added minimal project ; declaration (1 line change).

🤖 Generated with Claude Code

SLODD Bot and others added 11 commits January 15, 2026 17:56
The B2 build system couldn't find the libs/capy/test target because
the test/Jamfile had an anonymous project declaration.

Co-Authored-By: Claude <[email protected]>
The B2 workflow was using a hardcoded 'capy' module name, but the
repository is 'capy-ci-test'. This caused B2 to look for tests in
libs/capy/test instead of libs/capy-ci-test/test.

Use the dynamically computed module name from the patch step output.

Co-Authored-By: Claude <[email protected]>
- Comment out unused parameter 'stop_was_requested' in when_all.cpp
- Add GCC pragma to suppress false maybe-uninitialized warning in async_run.hpp

Co-Authored-By: Claude <[email protected]>
Sized operator delete(void*, size_t) is not available on all compilers.
Clang 15 with older libstdc++ headers does not have this overload.

Co-Authored-By: Claude <[email protected]>
- Remove explicit destructor call in deallocate_embedded() to prevent
  UB when other coroutine frames still hold pointers to the wrapper
- Rename test files with duplicate base names to avoid B2 target
  collision errors (error.cpp, executor.cpp, frame_allocator.cpp in
  subdirectories now have prefixed names)

Co-Authored-By: Claude <[email protected]>
- Change when_all_runner move constructor from =delete to =default
  (required by coroutine return in Clang 14)
- Refactor extract_results to avoid nested lambdas with pack expansion
  (triggers GCC 11 ICE in tsubst_pack_expansion)

Co-Authored-By: Claude <[email protected]>
GCC 11 raises false-positive -Wmaybe-uninitialized warnings for
std::optional<std::tuple<...>> in coroutine code. This is a known
GCC bug with complex template instantiations in coroutines.

Add pragma to suppress this warning in the test file.

Co-Authored-By: Claude <[email protected]>
The issue: when async_run_task awaited a user task, the user task's
frame (containing the embedded allocator wrapper) was destroyed before
async_run_task's frame. This left async_run_task with a dangling
pointer to the freed wrapper, causing use-after-free in operator delete.

The fix: defer destruction of the user's task until after async_run_task
is destroyed. This is done by:
1. Adding deferred_destroy_ member to promise_type
2. In transform_awaiter::await_resume, release ownership of the task
   and store the handle in deferred_destroy_
3. In final_suspend::await_suspend, destroy the deferred handle AFTER
   destroying async_run_task's frame

This ensures the wrapper (embedded in the first frame) outlives all
frames that reference it.

Co-Authored-By: Claude <[email protected]>
Add reference counting to frame_allocator_wrapper to defer deallocation
of the embedded block until all child frames are deallocated. This fixes
the use-after-free that occurred when child frames accessed the wrapper
after the embedded block was freed.

Co-Authored-By: Claude <[email protected]>
The boost_install export fails when building standalone because
dependencies are added with EXCLUDE_FROM_ALL.

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant