Aerc throws a segmentation fault when copying a large amount of text into the compose editor.
This has also been reported in https://todo.sr.ht/~sircmpwn/aerc2/410
It can be reproduced by pasting a large chunk of data (in my case ~5200bytes) once or multiple times from the clipboard to the editor window.
Looking at the stack trace, it seems that the problem is a concurrent access of the vterm field in the flushTerminal method of the Terminal widget. This can be avoided with a simple mutex.
I open this ticket for discussion and reference and will provide a patch that should solve it with the proposed solution above.