use qemu_memalign for all cpu structs

Some structs, specically CPUARMState is 16-bytes aligned.

This causes segment fault because gcc tends to vectorize

the assignment of the struct with infamous movaps tricks.

Without this patch, we fail on manylinux with 2.17 glibc

in release mode in i686.

qemu_memalign will ensure the alignment across platforms.
This commit is contained in:
mio
2024-10-17 13:34:31 +08:00
parent e8ca3cbea5
commit ffeddd7579
11 changed files with 22 additions and 12 deletions

2
uc.c
View File

@@ -515,7 +515,7 @@ uc_err uc_close(uc_engine *uc)
g_free(uc->cpu->thread);
/* cpu */
free(uc->cpu);
qemu_vfree(uc->cpu);
/* flatviews */
g_hash_table_destroy(uc->flat_views);