Print this page
new smatch
@@ -64,11 +64,11 @@
static struct smatch_state *unmatched_state(struct sm_state *sm)
{
struct smatch_state *state;
- state = get_state(SMATCH_EXTRA, sm->name, sm->sym);
+ state = __get_state(SMATCH_EXTRA, sm->name, sm->sym);
if (state)
return state;
return alloc_estate_whole(estate_type(sm->state));
}
@@ -114,19 +114,18 @@
* 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);
-
+ rl = 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)
+ 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);
}