https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95137
--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Martin Liška from comment #14) > The original problem: > > test.cc:3749:5: runtime error: member call on misaligned address > 0x000041b58ab3 for type 'struct awaiter', which requires 8 byte alignment > 0x000041b58ab3: note: pointer points here > <memory cannot be printed> > > @Iain: How do you allocate the awaiter object? The coro frame is laid out according to the types determined for the objects it contains (the awaiter types are known at the point it's laid out). It just uses the 'normal' struct building rules. Awaiters are most often initialised from return values from some promise method, but they can also be local vars or parms - perhaps I slipped up there. I have a thought that I might be failing to copy across excess alignment applied (which I will look at later). ^^^ these are things on my TO-LOOK-AT list. > > @Rafael: Can you please append output with: > export UBSAN_OPTIONS="print_stacktrace=1"