MCPcopy Create free account
hub / github.com/csmith-project/csmith / is_dangling_ptr

Method is_dangling_ptr

src/FactPointTo.cpp:499–505  ·  view source on GitHub ↗

* return true if ptr is dangling in the given context */

Source from the content-addressed store, hash-verified

497 * return true if ptr is dangling in the given context
498 */
499bool
500FactPointTo::is_dangling_ptr(const Variable* p, const std::vector<const Fact*>& facts)
501{
502 FactPointTo fp(p);
503 const FactPointTo* fact = (const FactPointTo*)find_related_fact(facts, &fp);
504 return (fact && (fact->is_dead() && CGOptions::dead_pointer_dereference_prob() == 0));
505}
506
507/* return true if the variable has any chance to be a local variable after dereference */
508bool FactPointTo::is_pointing_to_locals(const Variable* v, const Block* b, int indirection, const vector<const Fact*>& facts)

Callers

nothing calls this directly

Calls 2

find_related_factFunction · 0.85
is_deadMethod · 0.80

Tested by

no test coverage detected