model3d: disable UBSan alignment sanitization on m3d_load

Works around: https://gitlab.com/bztsrc/model3d/-/issues/19

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-11-14 16:52:34 -07:00
parent caafb26fe4
commit 917b0eb8be
2 changed files with 2 additions and 1 deletions

View file

@ -2377,6 +2377,7 @@ static M3D_FLOAT _m3d_rsq(M3D_FLOAT x)
/**
* Function to decode a Model 3D into in-memory format
*/
__attribute__((no_sanitize("alignment"))) // TODO(model3d): https://gitlab.com/bztsrc/model3d/-/issues/19
m3d_t *m3d_load(unsigned char *data, m3dread_t readfilecb, m3dfree_t freecb, m3d_t *mtllib)
{
unsigned char *end, *chunk, *buff, weights[8];