Skip to content

adapt to boost ucontext for asan#193

Merged
thweetkomputer merged 3 commits intoeloqdata:eloq-10.6.10from
thweetkomputer:asan_context
Dec 25, 2025
Merged

adapt to boost ucontext for asan#193
thweetkomputer merged 3 commits intoeloqdata:eloq-10.6.10from
thweetkomputer:asan_context

Conversation

@thweetkomputer
Copy link
Collaborator

@thweetkomputer thweetkomputer commented Dec 25, 2025

Summary by CodeRabbit

  • Chores
    • Internal build configuration updates to improve development and testing workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 25, 2025

Warning

Rate limit exceeded

@thweetkomputer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 4bf030d and 2589418.

📒 Files selected for processing (1)
  • data_substrate

Walkthrough

Updates the data_substrate submodule pointer and introduces ASAN-specific build configuration in CMake. When ASAN is enabled with coroutines, the build now sets a flag to use the ucontext backend and applies corresponding Boost compile definitions to the SQL target.

Changes

Cohort / File(s) Change Summary
Submodule Update
data_substrate
Submodule pointer updated from 8dce439e5e0c668da292e11486f42fd470cd19d4 to eca051c871abf02a6197a1eb81c670222596c535; no behavioral changes.
ASAN Build Configuration
sql/CMakeLists.txt
Added conditional ASAN-ucontext backend handling: introduces SQL_USE_ASAN_UCONTEXT variable and applies BOOST_USE_ASAN and BOOST_USE_UCONTEXT compile definitions to the sql target when coroutines and ASAN are both enabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • lzxddz

Poem

🐰 A fluffy hopper's build-time verse:

When ASAN guards and coroutines play,
Ucontext backends light the way,
Boost flags configured, oh so fine,
Our SQL builds are now divine! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'adapt to boost ucontext for asan' directly describes the main change: adapting the build system to use boost ucontext backend when ASAN is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
sql/CMakeLists.txt (1)

319-321: LGTM! The compile definitions are correctly scoped.

The use of PRIVATE scope for these Boost-specific definitions is appropriate since they're implementation details of the sql library. The placement after the target creation and linking is correct.

Optional: Consider simplifying the conditional logic

The intermediate variable SQL_USE_ASAN_UCONTEXT could be eliminated for a more direct approach:

-  if (WITH_ASAN)
-    # Boost stackful contexts need to switch to the ucontext backend when
-    # ASAN is enabled, otherwise fcontext symbols are missing at link time.
-    set(SQL_USE_ASAN_UCONTEXT ON)
-  endif()
+  # Boost stackful contexts need to switch to the ucontext backend when
+  # ASAN is enabled, otherwise fcontext symbols are missing at link time.

Then at lines 319-321:

-if (SQL_USE_ASAN_UCONTEXT)
+if (COROUTINE_ENABLED AND WITH_ASAN)
   target_compile_definitions(sql PRIVATE BOOST_USE_ASAN BOOST_USE_UCONTEXT)
 endif()

However, the current approach with the intermediate variable is also fine and may be clearer for future maintainers or if additional ASAN-related configuration is added later.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0fa6113 and 4bf030d.

📒 Files selected for processing (2)
  • data_substrate
  • sql/CMakeLists.txt
🔇 Additional comments (1)
sql/CMakeLists.txt (1)

288-292: The ASAN configuration is correct and follows Boost.Context official documentation. The macros BOOST_USE_ASAN and BOOST_USE_UCONTEXT are properly documented in the Boost.Context sanitizers support guide, and using compile definitions to force the ucontext backend (instead of the default fcontext assembly implementation) is the recommended approach to avoid linker issues with AddressSanitizer. The WITH_ASAN option is properly defined in the project's root CMakeLists.txt. No changes needed.

Copy link
Collaborator

@githubzilla githubzilla left a comment

Choose a reason for hiding this comment

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

+1

@thweetkomputer thweetkomputer merged commit 69a3bfe into eloqdata:eloq-10.6.10 Dec 25, 2025
2 of 3 checks passed
@thweetkomputer thweetkomputer deleted the asan_context branch December 25, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants