forked from enlightenment/efl
eo - fix - fix alignment of eo object class structs - it was wrong
the alignbment logic was wrong. we have to use the worst case. that means 8 or 16 byte alignment. eina mempool alignment logic is wrong for this as it assumes an array of typoes of all the same size... this fixes crashes seen on armv7 with sigbus in new gesture code which got unlucky. @fix
This commit is contained in:
parent
7c653df450
commit
2636853b7f
|
@ -247,7 +247,12 @@ _eo_id_mem_protect(void *ptr, Eina_Bool may_not_write)
|
|||
# define UNPROTECT(_ptr_)
|
||||
#endif
|
||||
|
||||
#define EO_ALIGN_SIZE(size) eina_mempool_alignof(size)
|
||||
#if __WORDSIZE == 32
|
||||
# define EO_ALIGN 16
|
||||
#else // __WORDSIZE == 64
|
||||
# define EO_ALIGN 8
|
||||
#endif
|
||||
#define EO_ALIGN_SIZE(size) (((size + EO_ALIGN - 1) / EO_ALIGN) * EO_ALIGN)
|
||||
|
||||
/* Entry */
|
||||
typedef struct
|
||||
|
|
Loading…
Reference in New Issue