<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 20 Jun 2022 at 7:09 PM, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto">Hello,<br>
<br>
iirc, the alignment is to sizeof(void*), which is 8.<br>
<br>
I haven't met cases when the alignment is required to be different that<br>
the size of the pointer/memory address. Any particular reason for<br>
wolfssl to require that?<br><br>
</blockquote></div></div><div><a href="https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html">https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html</a></div><div dir="auto">Modern malloc/realloc return 16 byte aligned memory on 64bit systems</div><div dir="auto">so 3rd party libraries now assume this behaviour.</div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto">With this flag turned on Kamailio will segfault unless I add wrappers to align up</div><div dir="auto">to 16 bytes.</div><div dir="auto"><br></div>