diff --git a/src/maat_compile.c b/src/maat_compile.c index 40cf4b5..42963ad 100644 --- a/src/maat_compile.c +++ b/src/maat_compile.c @@ -27,7 +27,6 @@ #include "alignment.h" #define MODULE_COMPILE module_name_str("maat.compile") -#define MAX_TABLE_LINE_SIZE (1024 * 16) struct compile_schema { int compile_id_column; @@ -139,7 +138,7 @@ struct compile_sort_para { #define MAAT_COMPILE_MAGIC 0x4a5b6c7d struct maat_compile { - uint32_t magic; + uint32_t magic_num; int actual_clause_num; int declared_clause_num; int not_clause_cnt; @@ -178,7 +177,7 @@ struct maat_compile *maat_compile_new(long long compile_id) { struct maat_compile *compile = ALLOC(struct maat_compile, 1); - compile->magic = MAAT_COMPILE_MAGIC; + compile->magic_num = MAAT_COMPILE_MAGIC; compile->compile_id = compile_id; for(int i = 0; i < MAX_ITEMS_PER_BOOL_EXPR; i++) { @@ -225,7 +224,7 @@ void maat_compile_free(struct maat_compile *compile) clause_state->in_use = 0; } - compile->magic = 0; + compile->magic_num = 0; FREE(compile); } @@ -1156,7 +1155,7 @@ size_t maat_compile_bool_matcher_match(struct compile_runtime *compile_rt, int i expr_match, MAX_SCANNER_HIT_COMPILE_NUM); for (int i = 0; i < bool_match_ret && ud_result_cnt < ud_array_size; i++) { compile = (struct maat_compile *)expr_match[i].user_tag; - assert(compile->magic == MAAT_COMPILE_MAGIC); + assert(compile->magic_num == MAAT_COMPILE_MAGIC); assert((unsigned long long)compile->compile_id == expr_match[i].expr_id); if (0 == compile->actual_clause_num) { continue; @@ -1259,7 +1258,7 @@ struct maat_compile *maat_compile_clone(struct maat_compile *compile, int deep_c { struct maat_compile *new_compile = ALLOC(struct maat_compile, 1); - new_compile->magic = compile->magic; + new_compile->magic_num = compile->magic_num; new_compile->compile_id = compile->compile_id; new_compile->actual_clause_num = compile->actual_clause_num; new_compile->declared_clause_num = compile->declared_clause_num; @@ -1586,7 +1585,7 @@ size_t compile_runtime_get_hit_paths(struct compile_runtime *compile_rt, int thr MAX_SCANNER_HIT_COMPILE_NUM); for (int idx = 0; idx < bool_match_ret; idx++) { compile = (struct maat_compile *)expr_match[idx].user_tag; - assert(compile->magic == MAAT_COMPILE_MAGIC); + assert(compile->magic_num == MAAT_COMPILE_MAGIC); assert((unsigned long long)compile->compile_id == expr_match[idx].expr_id); if (0 == compile->actual_clause_num || NULL == compile->user_data) { continue; diff --git a/src/maat_expr.c b/src/maat_expr.c index 5cc557f..b00817a 100644 --- a/src/maat_expr.c +++ b/src/maat_expr.c @@ -70,7 +70,7 @@ struct expr_item { struct expr_runtime { struct adapter_hs *hs; - struct rcu_hash_table *item_hash; // store hs_expr rule for rebuild adapter_hs instance + struct rcu_hash_table *item_hash; // long long version; //expr_rt version long long rule_num; diff --git a/src/maat_flag.c b/src/maat_flag.c index 6ad6650..5839280 100644 --- a/src/maat_flag.c +++ b/src/maat_flag.c @@ -46,7 +46,7 @@ struct flag_item { struct flag_runtime { struct flag_matcher *matcher; - struct rcu_hash_table *item_hash; + struct rcu_hash_table *item_hash; // long long rule_num; long long version; diff --git a/src/maat_interval.c b/src/maat_interval.c index db635e4..edc6f25 100644 --- a/src/maat_interval.c +++ b/src/maat_interval.c @@ -43,7 +43,7 @@ struct interval_item { struct interval_runtime { struct interval_matcher *matcher; - struct rcu_hash_table *item_hash; //store interval rule for rebuild interval_matcher instance + struct rcu_hash_table *item_hash; // long long version; long long rule_num; diff --git a/src/maat_ip.c b/src/maat_ip.c index a3e468e..4c62724 100644 --- a/src/maat_ip.c +++ b/src/maat_ip.c @@ -67,7 +67,7 @@ struct ip_item { struct ip_runtime { struct ip_matcher *ip_matcher; struct interval_matcher *intval_matcher; - struct rcu_hash_table *item_hash; + struct rcu_hash_table *item_hash; // long long version; long long rule_num; diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 7c31055..30ea49d 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -39,9 +39,9 @@ ExternalProject_Add(ragel PREFIX ragel INSTALL_COMMAND make install BUILD_IN_SOURCE 1) -# HyperScan 5.4.0 +# HyperScan 5.4.2 ExternalProject_Add(hyperscan PREFIX hyperscan - URL ${CMAKE_CURRENT_SOURCE_DIR}/hyperscan-5.4.0.tar.gz + URL ${CMAKE_CURRENT_SOURCE_DIR}/hyperscan-5.4.2.tar.gz DEPENDS ragel CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${VENDOR_BUILD} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC") diff --git a/vendor/hyperscan-5.4.0.tar.gz b/vendor/hyperscan-5.4.2.tar.gz similarity index 65% rename from vendor/hyperscan-5.4.0.tar.gz rename to vendor/hyperscan-5.4.2.tar.gz index 67a4e18..6c24610 100644 Binary files a/vendor/hyperscan-5.4.0.tar.gz and b/vendor/hyperscan-5.4.2.tar.gz differ