Team,
I'm trying to get a simple coroutine2 program to work with address
sanitizer and I'm running into a block. I'm building boost_1_78_0 as
follows: ./b2 context-impl=ucontext and compiling with -DBOOST_USE_ASAN and
-DBOOST_USE_CONTEXT. I've built and rebuilt the library thinking I've made
an error somewhere and it boils down to jump_fcontext and make_fcontext.
What am I doing wrong/missing?
Cheers,
TJ
g++ -DBOOST_USE_ASAN -DBOOST_USE_UCONTEXT
-I/home/tjisana/Downloads/boost_1_78_0 -O0 -g3 -fsanitize=address -pedantic
-Wall -c -fmessage-length=0 -o src/Testbed II.o ../src/Testbed II.cpp
g++ -L/home/tjisana/Downloads/boost_1_78_0/stage/lib -fsanitize=address -o
Testbed II src/Testbed II.o -lboost_context -lboost_coroutine
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld:
/home/tjisana/Downloads/boost_1_78_0/stage/lib/libboost_coroutine.so:
undefined reference to `jump_fcontext'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld:
/home/tjisana/Downloads/boost_1_78_0/stage/lib/libboost_coroutine.so:
undefined reference to `make_fcontext'
collect2: error: ld returned 1 exit status
#include <queue>
#include <memory>
#include "boost/coroutine2/coroutine.hpp"
typedef boost::coroutines2::coroutine<int> coro_t;
int main() {
int l = 0;
std::queue<int> y({1,2,3,4});
std::queue