https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95137
Rafael Avila de Espindola <rafael at espindo dot la> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48547|0 |1 is obsolete| | --- Comment #19 from Rafael Avila de Espindola <rafael at espindo dot la> --- Created attachment 48579 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48579&action=edit Single file testcase $ g++ -g -fcoroutines -std=gnu++20 coroutines_test.cc -o t && valgrind ./t no errors, exit value 42 $ g++ -g -fcoroutines -std=gnu++20 coroutines_test.cc -o t -fsanitize=address -fsanitize=undefined && ./t coroutines_test.cc:561:26: runtime error: member access within misaligned address 0x0000002231e6 for type 'struct promise_base', which requires 8 byte alignment 0x0000002231e6: note: pointer points here 5c 5d c3 cc 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 58 48 89 7d 88 48 8d 5d 90 49 89 df ^ AddressSanitizer:DEADLYSIGNAL ================================================================= ==112180==ERROR: AddressSanitizer: SEGV on unknown address 0x0000002231ee (pc 0x00000021adf2 bp 0x7ffdf0604570 sp 0x7ffdf06044f0 T0) ==112180==The signal is caused by a WRITE memory access. #0 0x21adf2 in seastar::internal::future_base::detach_promise() /home/espindola/scylla/t/coroutines_test.cc:561 #1 0x21ac94 in seastar::internal::future_base::clear() /home/espindola/scylla/t/coroutines_test.cc:556 #2 0x21acd2 in seastar::internal::future_base::~future_base() /home/espindola/scylla/t/coroutines_test.cc:559 #3 0x21e3d4 in seastar::future<>::~future() /home/espindola/scylla/t/coroutines_test.cc:645 #4 0x21d1e1 in seastar::internal::awaiter<>::~awaiter() /home/espindola/scylla/t/coroutines_test.cc:862 #5 0x215d02 in main::{lambda()#1}::operator()() const [clone .actor] /home/espindola/scylla/t/coroutines_test.cc:1172 #6 0x214d3b in operator() /home/espindola/scylla/t/coroutines_test.cc:1169 #7 0x216ab8 in apply /home/espindola/scylla/t/coroutines_test.cc:92 #8 0x216b8a in apply<main(int, char**)::<lambda()> > /home/espindola/scylla/t/coroutines_test.cc:97 #9 0x216d10 in operator() /home/espindola/scylla/t/coroutines_test.cc:680 #10 0x21765e in satisfy_with_result_of<seastar::future<T>::then_impl_nrvo<main(int, char**)::<lambda()>, seastar::future<> >::<lambda()>::<lambda(pr_type&, seastar::future_state<>&&)> mutable::<lambda()> > /home/espindola/scylla/t/coroutines_test.cc:793 #11 0x216fee in operator() /home/espindola/scylla/t/coroutines_test.cc:678 #12 0x218881 in run_and_dispose /home/espindola/scylla/t/coroutines_test.cc:376 #13 0x2143c2 in seastar::reactor::run_tasks(seastar::reactor::task_queue&) /home/espindola/scylla/t/coroutines_test.cc:1130 #14 0x21463e in seastar::reactor::run() /home/espindola/scylla/t/coroutines_test.cc:1138 #15 0x216852 in main /home/espindola/scylla/t/coroutines_test.cc:1173 #16 0x7faee1994041 in __libc_start_main (/lib64/libc.so.6+0x27041) #17 0x21190d in _start (/home/espindola/scylla/t/t+0x21190d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/espindola/scylla/t/coroutines_test.cc:561 in seastar::internal::future_base::detach_promise() ==112180==ABORTING