Open krtab opened 8 months ago
@filipeom : Eric volunteers to fix it and I'll mentor him if it is fine with you.
Malloc's pointer alignment seems not to be completely clearly defined, and even less clearly implemented
Yes you are correct, we do not implement nor have any mechanism to guarantee pointer alignment.
Eric volunteers to fix it and I'll mentor him if it is fine with you.
Of course! Thank you so much! :smiley:
I don't know if you saw, but this c frontend is moving to owi directly: https://github.com/OCamlPro/owi/pull/100. We might have to patch this there as well
Thanks @filipeom @krtab ! It helps me to understand the interface between Owi symbolic and C language https://github.com/OCamlPro/owi/pull/104
https://github.com/formalsec/waspc/blob/c7cd3f91dcee40cec532dc0cad21a96da9c1c988/share/lib/src/stdlib.c#L26-L32
We currently make no guarantee on the returned pointer alignment. Malloc's pointer alignment seems not to be completely clearly defined, and even less clearly implemented, but it is reasonable for a C programmer on x64 to expect
malloc(8)
to return an 8-aligned pointer.