From aef9f808913b36d24d390a0a58c8533c41483738 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Thu, 2 Jul 2020 20:59:59 +0800 Subject: [PATCH] =?UTF-8?q?Maat=5Fhierarchy=E6=80=BB=E6=98=AF=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=8F=AF=E7=94=A8=E7=9A=84compile=5Frule=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=90=8C=E6=AD=A5=E4=BF=AE=E5=A4=8Dmaster=E5=88=86?= =?UTF-8?q?=E6=94=AF=E4=B8=AD=E7=9A=84bug=EF=BC=9A=E5=9C=A8=E5=AF=B9?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=85=8D=E7=BD=AE=E6=8E=92=E5=BA=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=85=B6=E5=B7=B2=E8=A2=AB=E5=88=A0?= =?UTF-8?q?=E9=99=A4=EF=BC=8Ccompile=5Fsort=5Fpara=5Fset=E4=BC=9A=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E7=A9=BA=E6=8C=87=E9=92=88=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=AE=B5=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 2 +- src/entry/Maat_hierarchy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 3630b16..2ae109d 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -247,7 +247,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c } scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, MAX_SCANNER_HIT_NUM); - + //Maat_hierarchy is rwlock protected, it always returns non-NULL compile_rule. if(scan_ret>1) { qsort(compile_rule_array, scan_ret, sizeof(struct Maat_compile_rule*), diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index 3bd14b0..23de1b7 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -1206,7 +1206,7 @@ int Maat_hierarchy_region_compile(struct Maat_hierarchy_compile_mid* mid, int is { mid->not_clause_hitted_flag=1; } - else + else if(compile_array[i]->user_data)//For compile may be dettached by Maat_hierarchy_compile_dettach_user_data, only return non-NULL userdata. { if(r_in_c_cnt>0 || //compile hitted becasue of new reigon this_scan_region_hits==0) //or hit a compile that refer a NOT-logic group in previous scan.