On Mon, 20 Jun 2022 at 7:09 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
iirc, the alignment is to sizeof(void*), which is 8.
I haven't met cases when the alignment is required to be different that the size of the pointer/memory address. Any particular reason for wolfssl to require that?
https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.htm... Modern malloc/realloc return 16 byte aligned memory on 64bit systems so 3rd party libraries now assume this behaviour.
wolfSSL has some optimisations with aligned data and Debian has this flag on by default in 5.2.0. I did verify that without this flag existing shm functions work. With this flag turned on Kamailio will segfault unless I add wrappers to align up to 16 bytes.