zetzit / zz

πŸΊπŸ™ ZetZ a zymbolic verifier and tranzpiler to bare metal C
MIT License
1.6k stars 52 forks source link

emit tail sizeof as symbol and alloc accordingly in wrappers #61

Closed aep closed 4 years ago

aep commented 4 years ago

malloc(sizeof(Thing) + tail) is actually very wrong, because tail is a number of ITEMS not bytes.

we now emit the size of one of those items as tailsize_Thing and change wrappers accordingly