Skip to content

fix(integration_tests): call sigemptyset/sigaddset unqualified - #803

Merged
bburda merged 1 commit into
selfpatch:mainfrom
idesign0:fix/crash-backtrace-macos
Nov 20, 2026
Merged

bburda merged 1 commit into
selfpatch:mainfrom
idesign0:fix/crash-backtrace-macos

Conversation

@idesign0

Copy link
Copy Markdown
Contributor

Pull Request

Summary

On macOS, sigemptyset() and sigaddset() are also defined as macros in <signal.h>. The qualified calls ::sigemptyset(...) / ::sigaddset(...) in install_crash_backtrace() (ros2_medkit_integration_tests/crash_backtrace.hpp) therefore expand to ::(...) and fail to compile with Apple clang:

error: expected unqualified-id

This PR calls them unqualified, which works with both the macro and the function. No behaviour change.


Issue

No issue opened for this; it is a 4-line build fix. Happy to open one if you need it for tracking.


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

macOS 27 (arm64), Apple clang 21.0.0 (clang-2100.3.34.2):

Result
::sigemptyset(&set) / ::sigaddset(&set, SIGSEGV) ❌ expected unqualified-id
sigemptyset(&set) / sigaddset(&set, SIGSEGV) ✅ compiles
ros2_medkit_integration_tests with this change, ros2_macOS CI (ROS 2 Jazzy) ✅ run 44117826051

Not tested on Linux, where both forms compile. I'm relying on CI there.

Did you use Generative AI? Yes: Claude Code (Claude Opus 5.5) found the cause, wrote the change and ran the tests above. I reviewed the change and the results.


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

🤖 Generated with Claude Code

On macOS, sigemptyset() and sigaddset() are also defined as macros in
<signal.h>, so the qualified calls in install_crash_backtrace() expand
to `::(...)` and fail to compile with Apple clang:

  error: expected unqualified-id

Call them unqualified, which works with both the macro and the function.

Tested on macOS 27 (arm64), Apple clang 21.0.0: the qualified calls fail
with the error above, the unqualified ones compile. Built in the
ros2_macOS jazzy CI run https://github.com/idesign0/ros2_macOS/actions/runs/44117826051.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>

@bburda bburda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution and for testing it on macOS!

@bburda
bburda merged commit aa0c79b into selfpatch:main Nov 20, 2026
25 checks passed
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.

2 participants