Repository navigation
implemented the changes for P4453 - #349
Conversation
|
|
I see that |
|
From the call stack reported by TSan, the problem occurs at execution/tests/beman/execution/exec-parallel-scheduler.test.cpp Lines 273 to 277 in 976a337 std::exception_ptr being used across threads (one thread catches an exception and gets its exception_ptr using std::current_exception, and then another thread rethrows it with std::rethrow_exception; even if the former is guaranteed to happen before the latter, TSan may still report an error under Clang + libc++, as TSan doesn't know that decrementing the reference count in __cxa_end_catch in libc++abi.so is atomic).repro: https://godbolt.org/z/rvdqexrr3 |
There was a problem hiding this comment.
🟡 Changes recommended
There are still critical correctness and portability issues—make_sched’s behavior and diagnostic are inconsistent regarding get_scheduler(env), and the scheduler-allocator test has configuration-dependent missing includes plus an incorrect allocator implementation—so the change cannot be safely approved yet.
3 open issues
What changed in this PR
Implements P4453-related updates in beman::execution by adding a get_scheduler_allocator query, wiring it through the public API surface (headers + modules), and updating task scheduler construction/lifetime behavior with accompanying tests and build/CI/docs adjustments.
Changes:
- Add
get_scheduler_allocatorCPO (header + module) and re-export it via the mainexecutioninterfaces. - Update
taskinternals to construct/manage schedulers using the scheduler allocator query and adjust lifetime handling. - Add/extend tests (including a dedicated
exec-get-scheduler-allocatortest) and wire in TSan suppressions; update docs and Doxygen workflow pinning.
| File | Description |
|---|---|
| tests/beman/execution/tsan.supp | Adds ThreadSanitizer suppressions for known exception/refcount races in underlying runtimes. |
| tests/beman/execution/exec-task.test.cpp | Updates task-related tests to cover scheduler/allocator lifetime behavior and related imports. |
| tests/beman/execution/exec-get-scheduler-allocator.test.cpp | Introduces a new test validating get_scheduler_allocator selection/fallback behavior and related requirements. |
| tests/beman/execution/CMakeLists.txt | Registers the new test and configures TSan runs to use the provided suppressions file via environment options. |
| src/beman/execution/get_scheduler_allocator.cppm | Adds a new module unit exporting the get_scheduler_allocator API. |
| src/beman/execution/execution.cppm | Imports and re-exports get_scheduler_allocator from the main beman.execution module. |
| src/beman/execution/CMakeLists.txt | Updates the build configuration to include the new header/module sources. |
| include/beman/execution/execution.hpp | Exposes get_scheduler_allocator through the public umbrella header (include/import wiring). |
| include/beman/execution/detail/task.hpp | Adjusts task scheduler construction and lifetime management to use the scheduler allocator query and updated storage paths. |
| include/beman/execution/detail/get_scheduler_allocator.hpp | Introduces the get_scheduler_allocator customization point with fallback behavior (e.g., to get_allocator). |
| docs/overview.md | Updates the overview documentation to reflect additional scheduler-related requirements (including forward progress guarantee querying). |
| .github/workflows/doxygen-gh-pages.yml | Pins a specific Doxygen version for the GitHub Pages documentation build workflow. |
Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.


No description provided.