Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged sm_coretest_signal_key_1 at Robotics Stack Exchange
Package Summary
| Version | 3.1.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/robosoft-ai/SMACC2.git |
| VCS Type | git |
| VCS Version | jazzy |
| Last Updated | 2026-11-07 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Brett Aldrich
Authors
sm_coretest_signal_key_1
Core test for signal-connection cleanup of state-scoped subscribers. It checks that when a
client behavior or a state subscribes to a signal with this, the connection is finalized when
the subscriber is destroyed, so that later emissions never reach a dead object.
Design
-
ClTickSource(inOrTick) owns a free-runningCpRos2Timerat 5 Hz. The component lives for the whole state machine, so itsonTimerTicksignal keeps firing after any state has exited. -
CbMixinFirstSubscriberis deliberately declared: public ISmaccUpdatable, public SmaccClientBehavior, with the non-SMACC base first. That layout places theISmaccClientBehaviorsubobject away from the start of the object, so the pointer the behavior subscribes with and the base pointer the orthogonal disposes it with are different addresses. The behavior subscribes to the tick inonEntryand logs[CbMixinFirstSubscriber] TICK n. -
StAruns the behavior for 1 s and also subscribes to the same tick itself, withthis, from its ownonEntry, logging[StA] STATE TICK n. Boost.Statechart destroys the state object right afterexit(). -
StRest(1 s) has no subscriber of either kind. The machine cyclesStA -> StRest -> StAevery 2 s.
Pass criteria
- No
TICKorSTATE TICKline is logged whileStRestis active. Any such line is a callback delivered into a destroyed behavior or state. - Each
StAlifetime logs about 5 ticks for the behavior and about 5 for the state, reported at exit (onExit, ticks=andExiting. state ticks=). - Under AddressSanitizer: no
heap-use-after-free, noSEGV.
The failure signature, if the cleanup regresses, is a heap-use-after-free inside the bound
signal lambda under CpRos2Timer::timerCallback, with the memory freed either by the
orthogonal’s shared_ptr release (behavior case) or by boost::statechart::detail::deallocate
(state case). In a plain build the state case segfaults on the first tick after the first
StA exit.
Running
Plain:
ros2 launch sm_coretest_signal_key_1 sm_coretest_signal_key_1.launch.py
The launch file tees the node output to /tmp/sm_coretest_signal_key_1_latest.log.
For sanitizer runs, build in a separate build and install base with the sanitizer flags and
run the node binary directly, without a launch prefix (a stdbuf prefix preloads a library
ahead of the sanitizer runtime and ASan refuses to start):
install_asan/sm_coretest_signal_key_1/lib/sm_coretest_signal_key_1/sm_coretest_signal_key_1_node --ros-args --log-level INFO
Twelve seconds, six cycles, is enough to see every pass criterion.
Note
StA reaches the timer component through the state-level requiresComponent, once by type and
once by name (the empty default name), and logs an error if the two disagree. Until the
forwarders were fixed the state had to go through
getOrthogonal<OrTick>()->getClients().front()->getComponent<CpRos2Timer>().
StA also asks for ClAbsent, a client type no orthogonal holds, through the state-level
requiresClient on every entry. The core answers with a null pointer and one ERROR line naming
the state ([sm_coretest_signal_key_1::StA] Client of type ... not found); that line is
expected, six times in a 12 s run. The state name in it must be intact: the core used to take
c_str() of a temporary for it, which read freed memory (a heap-use-after-free under ASan).
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| smacc2 | |
| cl_ros2_timer | |
| rclcpp |