diff options
| author | zhengchao <[email protected]> | 2020-12-05 13:50:03 +0600 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2020-12-05 13:50:03 +0600 |
| commit | f45814d0b75aa00a7a833ed878ffcf085376f0db (patch) | |
| tree | 9700fea4ed5c226c93a053ee1cd4a7162de078ef | |
| parent | e6a7f248638d6d8f70452eebb4270b98685f97f0 (diff) | |
修复Maat_hierarchy_region_compile中对compile->literal_ids的线程不安全访问,在配置更新时可导致段错误。v3.1.6
| -rw-r--r-- | src/entry/Maat_hierarchy.cpp | 2 | ||||
| -rw-r--r-- | src/entry/Maat_rule.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index 7cb33cc..ee2227e 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -923,10 +923,10 @@ int Maat_hierarchy_rebuild(struct Maat_hierarchy* hier) { int ret=0; struct bool_matcher* new_bm=NULL, *old_bm=NULL; + pthread_rwlock_wrlock(&hier->rwlock); new_bm=Maat_hierarchy_build_bool_matcher(hier); old_bm=hier->bm; - pthread_rwlock_wrlock(&hier->rwlock); hier->bm=new_bm; pthread_rwlock_unlock(&hier->rwlock); diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index d40cf64..af3b034 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -56,7 +56,7 @@ extern "C" } #endif -int MAAT_FRAME_VERSION_3_1_4_20201124=1; +int MAAT_FRAME_VERSION_3_1_4_20201205=1; int is_valid_table_name(const char* str) { |
