From 3429b552bc4367136f015c182f723ee977bb55a3 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 28 Sep 2024 17:47:49 +0200 Subject: Solved alignment UB issue --- test/090_tables_readwrite/tables_readwrite_tests.c | 6 +++--- test/100_gendata_cocsep/gendata_cocsep_tests.c | 6 +++--- test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/090_tables_readwrite/tables_readwrite_tests.c b/test/090_tables_readwrite/tables_readwrite_tests.c index e1c2015..73c4e21 100644 --- a/test/090_tables_readwrite/tables_readwrite_tests.c +++ b/test/090_tables_readwrite/tables_readwrite_tests.c @@ -5,19 +5,19 @@ #define INFO_DISTRIBUTION_LEN 21 typedef struct { - char solver[INFO_SOLVER_STRLEN]; + uint64_t distribution[INFO_DISTRIBUTION_LEN]; uint64_t type; uint64_t infosize; uint64_t fullsize; uint64_t hash; uint64_t entries; uint64_t classes; + uint64_t next; + char solver[INFO_SOLVER_STRLEN]; uint8_t h48h; uint8_t bits; uint8_t base; uint8_t maxvalue; - uint64_t next; - uint64_t distribution[INFO_DISTRIBUTION_LEN]; } tableinfo_t; bool readtableinfo(const void *, tableinfo_t *); diff --git a/test/100_gendata_cocsep/gendata_cocsep_tests.c b/test/100_gendata_cocsep/gendata_cocsep_tests.c index 7630a71..62f52fb 100644 --- a/test/100_gendata_cocsep/gendata_cocsep_tests.c +++ b/test/100_gendata_cocsep/gendata_cocsep_tests.c @@ -6,19 +6,19 @@ #define COCSEP_CLASSES 3393 typedef struct { - char solver[INFO_SOLVER_STRLEN]; + uint64_t distribution[INFO_DISTRIBUTION_LEN]; uint64_t type; uint64_t infosize; uint64_t fullsize; uint64_t hash; uint64_t entries; uint64_t classes; /* Used only by cocsepdata, for now */ + uint64_t next; + char solver[INFO_SOLVER_STRLEN]; uint8_t h48h; uint8_t bits; uint8_t base; uint8_t maxvalue; - uint64_t next; - uint64_t distribution[INFO_DISTRIBUTION_LEN]; } tableinfo_t; size_t gendata_cocsep(void *, uint64_t *, cube_t *); diff --git a/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c b/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c index c37de3e..7c5b441 100644 --- a/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c +++ b/test/120_gendata_h48h0k4/gendata_h48h0k4_tests.c @@ -6,19 +6,19 @@ #define INFO_DISTRIBUTION_LEN 21 typedef struct { - char solver[INFO_SOLVER_STRLEN]; + uint64_t distribution[INFO_DISTRIBUTION_LEN]; uint64_t type; uint64_t infosize; uint64_t fullsize; uint64_t hash; uint64_t entries; uint64_t classes; /* Used only by cocsepdata, for now */ + uint64_t next; + char solver[INFO_SOLVER_STRLEN]; uint8_t h48h; uint8_t bits; uint8_t base; uint8_t maxvalue; - uint64_t next; - uint64_t distribution[INFO_DISTRIBUTION_LEN]; } tableinfo_t; typedef struct { -- cgit v1.3