Print this page
11972 resync smatch
*** 64,74 ****
static struct smatch_state *unmatched_state(struct sm_state *sm)
{
struct smatch_state *state;
! state = get_state(SMATCH_EXTRA, sm->name, sm->sym);
if (state)
return state;
return alloc_estate_whole(estate_type(sm->state));
}
--- 64,74 ----
static struct smatch_state *unmatched_state(struct sm_state *sm)
{
struct smatch_state *state;
! state = __get_state(SMATCH_EXTRA, sm->name, sm->sym);
if (state)
return state;
return alloc_estate_whole(estate_type(sm->state));
}
*** 114,132 ****
* point where we say "pointer x will succeed, but everything else will
* fail." And then we introduce a new caller which passes a different
* pointer and it's like, "Sorry bro, that's not possible."
*
*/
! rl = rl_intersection(estate_rl(state), valid_ptr_rl);
! if (!rl)
! return estate_rl(state);
!
FOR_EACH_PTR(rl, drange) {
if (drange->min.value != drange->max.value)
continue;
! if (drange->min.value > -4096 && drange->min.value <= 0)
continue;
return rl_union(valid_ptr_rl, rl);
} END_FOR_EACH_PTR(drange);
return estate_rl(state);
}
--- 114,131 ----
* point where we say "pointer x will succeed, but everything else will
* fail." And then we introduce a new caller which passes a different
* pointer and it's like, "Sorry bro, that's not possible."
*
*/
! rl = estate_rl(state);
FOR_EACH_PTR(rl, drange) {
if (drange->min.value != drange->max.value)
continue;
! if (drange->min.value == 0)
continue;
+ if (is_err_ptr(drange->min))
+ continue;
return rl_union(valid_ptr_rl, rl);
} END_FOR_EACH_PTR(drange);
return estate_rl(state);
}