From 16c9292702ba3b6030a499bc98e4edf8abfe87cf Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 14 Nov 2025 15:38:18 +0000 Subject: [PATCH 1/2] Update sanitizers support documentation Fix: https://github.com/boostorg/fiber/issues/289 Clarify instructions for using AddressSanitizer with Boost.Context. --- doc/stack.qbk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/stack.qbk b/doc/stack.qbk index fa64c8f9..44ce74c8 100644 --- a/doc/stack.qbk +++ b/doc/stack.qbk @@ -294,9 +294,10 @@ as stack space which suppresses the errors. Sanitizers (GCC/Clang) are confused by the stack switches. The library (and Boost.Context too) is required to be compiled with property (b2 command-line) -`context-impl=ucontext` and compilers santizer options. -Users must define `BOOST_USE_ASAN` before including any Boost.Context headers -when linking against Boost binaries. +`context-impl=ucontext` and compiler sanitizer options. + +To use AddressSanitizer, you need to add `define=BOOST_USE_ASAN` to `b2` flags to compile Boost libraries, +and also define `BOOST_USE_ASAN` before including any Boost.Context headers in your code. [endsect] From d342b9ec502e79c0e1e4f36835f4f22fd4082611 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 14 Nov 2025 15:42:50 +0000 Subject: [PATCH 2/2] Clarify sanitizer support instructions in documentation Updated sanitizer documentation to include relevant b2 options. --- doc/stack.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/stack.qbk b/doc/stack.qbk index 44ce74c8..f852a2a5 100644 --- a/doc/stack.qbk +++ b/doc/stack.qbk @@ -294,7 +294,7 @@ as stack space which suppresses the errors. Sanitizers (GCC/Clang) are confused by the stack switches. The library (and Boost.Context too) is required to be compiled with property (b2 command-line) -`context-impl=ucontext` and compiler sanitizer options. +`context-impl=ucontext` and [@https://www.boost.org/doc/contributor-guide/testing/sanitizers.html relevant b2 sanitizer options]. To use AddressSanitizer, you need to add `define=BOOST_USE_ASAN` to `b2` flags to compile Boost libraries, and also define `BOOST_USE_ASAN` before including any Boost.Context headers in your code.