增加异常处理region compile时对bool matcher判空。
This commit is contained in:
@@ -209,10 +209,16 @@ int region_compile(_Maat_feather_t*feather, struct _INNER_scan_status_t *_mid, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scan_ret=bool_matcher_match(bm, thread_num,
|
if(bm)
|
||||||
|
{
|
||||||
|
scan_ret=bool_matcher_match(bm, thread_num,
|
||||||
_mid->all_hit_group_array, _mid->all_hit_group_cnt,
|
_mid->all_hit_group_array, _mid->all_hit_group_cnt,
|
||||||
(void **)relation_array, MAX_SCANNER_HIT_NUM);
|
(void **)relation_array, MAX_SCANNER_HIT_NUM);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scan_ret=0;
|
||||||
|
}
|
||||||
if(scan_ret>1)
|
if(scan_ret>1)
|
||||||
{
|
{
|
||||||
qsort(relation_array, scan_ret, sizeof(struct Maat_compile_group_relation**),
|
qsort(relation_array, scan_ret, sizeof(struct Maat_compile_group_relation**),
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ int invalidate_line(char* line, enum MAAT_TABLE_TYPE type,int valid_column_seq)
|
|||||||
void serialize_group(const struct Maat_group_t* p_group, enum MAAT_OPERATION op, char* buff, size_t sz)
|
void serialize_group(const struct Maat_group_t* p_group, enum MAAT_OPERATION op, char* buff, size_t sz)
|
||||||
{
|
{
|
||||||
if(op==MAAT_OP_RENEW_TIMEOUT) op=MAAT_OP_ADD;
|
if(op==MAAT_OP_RENEW_TIMEOUT) op=MAAT_OP_ADD;
|
||||||
snprintf(buff, sz, "%d\t%d\t%d\t%d\t%d", p_group->group_id,
|
snprintf(buff, sz, "%d\t%d\t%d\t%d\t%d\tnull", p_group->group_id,
|
||||||
p_group->parent_id,
|
p_group->parent_id,
|
||||||
op,
|
op,
|
||||||
p_group->not_flag,
|
p_group->not_flag,
|
||||||
|
|||||||
@@ -619,6 +619,7 @@ void make_group_set(struct Maat_compile_group_relation* relation, struct bool_ex
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
//high 32 bit is virtual table id, low 32 bit is group id.
|
||||||
a_set->items[j].item_id=(unsigned long long)relation->virtual_table_id[j]<<32|group->group_id;
|
a_set->items[j].item_id=(unsigned long long)relation->virtual_table_id[j]<<32|group->group_id;
|
||||||
a_set->items[j].not_flag=relation->not_flag[j];
|
a_set->items[j].not_flag=relation->not_flag[j];
|
||||||
if(a_set->items[j].not_flag)
|
if(a_set->items[j].not_flag)
|
||||||
|
|||||||
Reference in New Issue
Block a user