[c++] weak_ptr model

Reviewed By: akotulski

Differential Revision: D5398162

fbshipit-source-id: bf61516
master
Mehdi Bouaziz 7 years ago committed by Facebook Github Bot
parent 5784357322
commit 30e1f4295b

@ -3,3 +3,4 @@
#define shared_ptr std__shared_ptr #define shared_ptr std__shared_ptr
#define unique_ptr std__unique_ptr #define unique_ptr std__unique_ptr
#define make_unique std__make_unique #define make_unique std__make_unique
#define weak_ptr std__weak_ptr

@ -3,3 +3,4 @@
#undef shared_ptr #undef shared_ptr
#undef unique_ptr #undef unique_ptr
#undef make_unique #undef make_unique
#undef weak_ptr

@ -12,6 +12,7 @@
#include <infer_model/common.h> #include <infer_model/common.h>
#include <infer_model/infer_traits.h> #include <infer_model/infer_traits.h>
#include <infer_model/weak_ptr.h>
INFER_NAMESPACE_STD_BEGIN INFER_NAMESPACE_STD_BEGIN
@ -141,7 +142,6 @@ class shared_ptr : public std__shared_ptr<T> {
} }
template <class Y, template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type> typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
shared_ptr(const shared_ptr<Y>& r) noexcept { shared_ptr(const shared_ptr<Y>& r) noexcept {
model_copy(__cast_to_infer_ptr(this), __cast_to_infer_ptr(&r)); model_copy(__cast_to_infer_ptr(this), __cast_to_infer_ptr(&r));
@ -159,7 +159,9 @@ class shared_ptr : public std__shared_ptr<T> {
template <class Y, template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type> typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
explicit shared_ptr(const weak_ptr<Y>& r) {} explicit shared_ptr(const weak_ptr<Y>& r) : shared_ptr(std::move(r.lock())) {
// TODO: throw if r is empty
}
/* Because of implementation differences between libc++ and stdlibc++, don't /* Because of implementation differences between libc++ and stdlibc++, don't
* define this constructor (it will be defined elsewhere in case of * define this constructor (it will be defined elsewhere in case of
@ -408,5 +410,26 @@ shared_ptr<T> make_shared(Args&&... args) {
return shared_ptr<T>(::new T(std::forward<Args>(args)...)); return shared_ptr<T>(::new T(std::forward<Args>(args)...));
} }
template <class T>
struct owner_less;
template <class T>
struct owner_less<shared_ptr<T>>
: binary_function<shared_ptr<T>, shared_ptr<T>, bool> {
typedef bool result_type;
bool operator()(shared_ptr<T> const& x, shared_ptr<T> const& y) const {
return x.owner_before(y);
}
bool operator()(shared_ptr<T> const& x, weak_ptr<T> const& y) const {
return x.owner_before(y);
}
bool operator()(weak_ptr<T> const& x, shared_ptr<T> const& y) const {
return x.owner_before(y);
}
};
#undef __cast_to_infer_ptr #undef __cast_to_infer_ptr
INFER_NAMESPACE_STD_END INFER_NAMESPACE_STD_END

@ -0,0 +1,176 @@
/*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#include <infer_model/common.h>
#include <infer_model/infer_traits.h>
unsigned long int __infer_nondet_unsigned_long_int();
INFER_NAMESPACE_STD_BEGIN
// forward declaration because it is used here
template <class T>
class shared_ptr;
// Ideally: : public std__weak_ptr<T>
// use inheritance to avoid compilation errors when using
// methods / non-member functions that are not modeled
// Currently not inherited because it leads to Symexec_memory_error
template <class T>
class weak_ptr {
template <class>
friend class weak_ptr;
// WARNING: if sizeof(weak_ptr) becomes different than 16, it may
// lead to compilation errors
T* ptr;
void* __ignore;
public:
// Conversion constructors to allow implicit conversions.
// it's here purely to avoid compilation errors
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr(const std__weak_ptr<Y>& r) {}
// constructors:
constexpr weak_ptr() noexcept { ptr = nullptr; }
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr(const shared_ptr<Y>& r) noexcept {
ptr = r.get();
}
weak_ptr(const weak_ptr& r) noexcept { ptr = r.ptr; }
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr(const weak_ptr<Y>& r) noexcept {
ptr = r.ptr;
}
weak_ptr(weak_ptr&& r) noexcept {
ptr = r.ptr;
r.ptr = nullptr;
}
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr(weak_ptr<Y>&& r) noexcept {
ptr = r.ptr;
r.ptr = nullptr;
}
// destructor:
~weak_ptr() { ptr = nullptr; }
// assignment:
weak_ptr& operator=(const weak_ptr& r) noexcept {
// weak_ptr<T>(r).swap(*this);
ptr = r.ptr;
return *this;
}
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr& operator=(const weak_ptr<Y>& r) noexcept {
// weak_ptr<T>(r).swap(*this);
ptr = r.ptr;
return *this;
}
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr& operator=(const shared_ptr<Y>& r) noexcept {
// weak_ptr<T>(r).swap(*this);
ptr = r.get();
return *this;
}
weak_ptr& operator=(weak_ptr&& r) noexcept {
// shared_ptr<T>(std::move(r)).swap(*this);
ptr = r.ptr;
r.ptr = nullptr;
return *this;
}
template <class Y,
typename = typename enable_if<is_convertible<Y*, T*>::value>::type>
weak_ptr& operator=(weak_ptr<Y>&& r) {
// weak_ptr<T>(std::move(r)).swap(*this);
ptr = r.ptr;
r.ptr = nullptr;
return *this;
}
// modifiers:
void swap(weak_ptr& r) noexcept {
T* tmp = ptr;
ptr = r.ptr;
r.ptr = tmp;
}
void reset() noexcept {
// weak_ptr().swap(*this);
ptr = nullptr;
}
// observers:
long use_count() const noexcept {
if (ptr) {
return __infer_nondet_unsigned_long_int();
}
return 0;
}
bool expired() const noexcept { return use_count() <= 0; }
shared_ptr<T> lock() const noexcept {
if (use_count() > 0) {
return shared_ptr<T>(ptr);
}
return shared_ptr<T>();
}
template <class U>
bool owner_before(shared_ptr<U> const& b) const {
return true; /* FIXME - use non-det*/
}
template <class U>
bool owner_before(weak_ptr<U> const& b) const {
return true; /* FIXME - use non-det */
}
};
template <class T>
struct owner_less;
template <class T>
struct owner_less<weak_ptr<T>>
: binary_function<weak_ptr<T>, weak_ptr<T>, bool> {
typedef bool result_type;
bool operator()(weak_ptr<T> const& x, weak_ptr<T> const& y) const {
return x.owner_before(y);
}
bool operator()(shared_ptr<T> const& x, weak_ptr<T> const& y) const {
return x.owner_before(y);
}
bool operator()(weak_ptr<T> const& x, shared_ptr<T> const& y) const {
return x.owner_before(y);
}
};
INFER_NAMESPACE_STD_END

@ -64,62 +64,62 @@ digraph iCFG {
"unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ; "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void const *=n$1 [line 54]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 55]\n n$1=*&value:int [line 55]\n *n$0:void const *=n$1 [line 55]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void const *=n$1 [line 66]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 67]\n n$1=*&value:void* [line 67]\n *n$0:void const *=n$1 [line 67]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 100]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 101]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 101]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 101]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 100]\n n$2=*n$1:int* [line 100]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 182]\n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 182]\n " shape="box"]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 234]\n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 238]\n " shape="box"] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 240]\n n$1=*&p:int* [line 240]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 240]\n " shape="box"]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ;

@ -64,62 +64,62 @@ digraph iCFG {
"unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ; "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void const *=n$1 [line 54]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 55]\n n$1=*&value:int [line 55]\n *n$0:void const *=n$1 [line 55]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void const *=n$1 [line 66]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 67]\n n$1=*&value:void* [line 67]\n *n$0:void const *=n$1 [line 67]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 100]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 101]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 101]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 101]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 100]\n n$2=*n$1:int* [line 100]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 182]\n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 182]\n " shape="box"]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 234]\n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 238]\n " shape="box"] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 240]\n n$1=*&p:int* [line 240]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 240]\n " shape="box"]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ;

@ -64,62 +64,62 @@ digraph iCFG {
"unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ; "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void const *=n$1 [line 54]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 55]\n n$1=*&value:int [line 55]\n *n$0:void const *=n$1 [line 55]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void const *=n$1 [line 66]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 67]\n n$1=*&value:void* [line 67]\n *n$0:void const *=n$1 [line 67]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 100]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 101]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 101]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 101]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 100]\n n$2=*n$1:int* [line 100]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 182]\n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 182]\n " shape="box"]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 234]\n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 238]\n " shape="box"] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 240]\n n$1=*&p:int* [line 240]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 240]\n " shape="box"]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ;

@ -64,62 +64,62 @@ digraph iCFG {
"unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ; "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_4" -> "unused_deref_in_header#_Z22unused_deref_in_headerPi.4ca6dae5ef0c61fe5177a61b80c5eccb_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:int\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 54]\n n$1=*&value:int [line 54]\n *n$0:void const *=n$1 [line 54]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 55]\n n$1=*&value:int [line 55]\n *n$0:void const *=n$1 [line 55]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvDn).24f333ae8929817fff3c263651c77d16_2" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" [label="1: Start std::shared_ptr<int>_model_set\nFormals: self:void const ** value:void*\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_1" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" ;
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" [label="2: Exit std::shared_ptr<int>_model_set \n " color=yellow style=filled]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 66]\n n$1=*&value:void* [line 66]\n *n$0:void const *=n$1 [line 66]\n " shape="box"] "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:void const ** [line 67]\n n$1=*&value:void* [line 67]\n *n$0:void const *=n$1 [line 67]\n " shape="box"]
"model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ; "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_3" -> "model_set#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE9model_setEPPKvPv).0cb322c919ae980fbaa034b2b8b82974_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 99]\n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" [label="1: Start std::shared_ptr<int>_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_1" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" [label="2: Exit std::shared_ptr<int>_shared_ptr \n " color=yellow style=filled]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 100]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 100]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 101]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,null:int) [line 101]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_2" ;
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 100]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 99]\n n$2=*n$1:int* [line 99]\n " shape="box"] "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" [label="4: Constructor Init \n n$1=*&this:int** [line 101]\n _fun_std::std__shared_ptr<int>_std__shared_ptr(n$1:int**) [line 100]\n n$2=*n$1:int* [line 100]\n " shape="box"]
"shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ; "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_4" -> "shared_ptr#shared_ptr<int>#std#{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.a83df2e127dfd835cd19672b6db04408_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" [label="1: Start std::shared_ptr<int>_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 182]\n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_1" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" ;
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr<int>_~shared_ptr \n " color=yellow style=filled]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 180]\n _=*n$0:int* [line 180]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 180]\n " shape="box"] "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr<int>_reset<int,_void> \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr<int>_reset<int,_void>(n$0:int**,null:int*) [line 182]\n " shape="box"]
"~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 232]\n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" [label="1: Start std::shared_ptr<int>_reset<int,_void>\nFormals: this:int** p:int*\nLocals: \n DECLARE_LOCALS(&return); [line 234]\n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_1" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" ;
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" [label="2: Exit std::shared_ptr<int>_reset<int,_void> \n " color=yellow style=filled]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 238]\n n$1=*&p:int* [line 238]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 238]\n " shape="box"] "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" [label="3: Call _fun_std::shared_ptr<int>_model_set \n n$0=*&this:int** [line 240]\n n$1=*&p:int* [line 240]\n _fun_std::shared_ptr<int>_model_set(n$0:void const **,n$1:void*) [line 240]\n " shape="box"]
"reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ; "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_3" -> "reset<int,_void>#shared_ptr<int>#std#(_ZNSt3__110shared_ptrIiE5resetIivEEvPT_).a1205b56a9f5cca1b1c1504f3db46c6e_2" ;

@ -11,7 +11,7 @@ ANALYZER = infer
CLANG_OPTIONS = -x c++ -std=c++14 -isystem$(ROOT_DIR) -c CLANG_OPTIONS = -x c++ -std=c++14 -isystem$(ROOT_DIR) -c
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--no-failures-allowed --pmd-xml --no-failures-allowed --pmd-xml --report-custom-error
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \

@ -140,6 +140,25 @@ codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_
codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_null_deref, 3, NULL_DEREFERENCE, [start of procedure unique_ptr::unique_ptr_move_null_deref()] codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_null_deref, 3, NULL_DEREFERENCE, [start of procedure unique_ptr::unique_ptr_move_null_deref()]
codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_ok_deref, 3, UNINITIALIZED_VALUE, [start of procedure unique_ptr::unique_ptr_move_ok_deref()] codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_ok_deref, 3, UNINITIALIZED_VALUE, [start of procedure unique_ptr::unique_ptr_move_ok_deref()]
codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_ok_deref, 4, MEMORY_LEAK, [start of procedure unique_ptr::unique_ptr_move_ok_deref(),return from a call to unique_ptr::unique_ptr_move_ok_deref] codetoanalyze/cpp/errors/smart_ptr/unique_ptr_deref.cpp, unique_ptr::unique_ptr_move_ok_deref, 4, MEMORY_LEAK, [start of procedure unique_ptr::unique_ptr_move_ok_deref(),return from a call to unique_ptr::unique_ptr_move_ok_deref]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromSharedBaseAssign_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedBaseAssign_bad(),start of procedure weak_ptr_constructors::fromSharedBaseAssign(),return from a call to weak_ptr_constructors::fromSharedBaseAssign,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromSharedBaseConstr_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedBaseConstr_bad(),start of procedure weak_ptr_constructors::fromSharedBaseConstr(),return from a call to weak_ptr_constructors::fromSharedBaseConstr,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromSharedDerivedAssign_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedDerivedAssign_bad(),start of procedure weak_ptr_constructors::fromSharedDerivedAssign(),return from a call to weak_ptr_constructors::fromSharedDerivedAssign,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromSharedDerivedConstr2_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedDerivedConstr2_bad(),start of procedure weak_ptr_constructors::fromSharedDerivedConstr2(),return from a call to weak_ptr_constructors::fromSharedDerivedConstr2,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromSharedDerivedConstr_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedDerivedConstr_bad(),start of procedure weak_ptr_constructors::fromSharedDerivedConstr(),return from a call to weak_ptr_constructors::fromSharedDerivedConstr,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromWeakBaseAssign_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromWeakBaseAssign_bad(),start of procedure weak_ptr_constructors::fromWeakBaseAssign(),return from a call to weak_ptr_constructors::fromWeakBaseAssign,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromWeakBaseConstr_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromWeakBaseConstr_bad(),start of procedure weak_ptr_constructors::fromWeakBaseConstr(),return from a call to weak_ptr_constructors::fromWeakBaseConstr,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromWeakDerivedAssign_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromWeakDerivedAssign_bad(),start of procedure weak_ptr_constructors::fromWeakDerivedAssign(),return from a call to weak_ptr_constructors::fromWeakDerivedAssign,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_derefs::safeGetFromWeakDerivedConstr_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromWeakDerivedConstr_bad(),start of procedure weak_ptr_constructors::fromWeakDerivedConstr(),return from a call to weak_ptr_constructors::fromWeakDerivedConstr,start of procedure weak_ptr_derefs::safeGet(),Condition is true,Condition is false,return from a call to weak_ptr_derefs::safeGet]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::empty_weak_lock_returns_null_bad, 3, NULL_DEREFERENCE, [start of procedure weak_ptr_observers::empty_weak_lock_returns_null_bad()]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::expired_after_reset_bad, 5, expired after weak_ptr reset is true, [start of procedure weak_ptr_observers::expired_after_reset_bad(),Condition is true,return from a call to weak_ptr_observers::expired_after_reset_bad]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::expired_after_swap_bad, 6, expired after weak_ptr swap with empty is true, [start of procedure weak_ptr_observers::expired_after_swap_bad(),Condition is true,return from a call to weak_ptr_observers::expired_after_swap_bad]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::expired_empty_bad, 5, expired on empty weak_ptr is true, [start of procedure weak_ptr_observers::expired_empty_bad(),Condition is true,return from a call to weak_ptr_observers::expired_empty_bad]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::expired_means_null_bad, 3, NULL_DEREFERENCE, [start of procedure weak_ptr_observers::expired_means_null_bad(),Condition is true]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::lock_can_be_null_bad, 2, NULL_DEREFERENCE, [start of procedure weak_ptr_observers::lock_can_be_null_bad()]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::shared_still_in_scope_good_FP, 6, NULL_DEREFERENCE, [start of procedure weak_ptr_observers::shared_still_in_scope_good_FP()]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::use_count_after_reset_bad, 5, use_count after weak_ptr reset is 0, [start of procedure weak_ptr_observers::use_count_after_reset_bad(),Condition is true,return from a call to weak_ptr_observers::use_count_after_reset_bad]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::use_count_empty_bad, 5, use_count on empty weak_ptr is 0, [start of procedure weak_ptr_observers::use_count_empty_bad(),Condition is true,return from a call to weak_ptr_observers::use_count_empty_bad]
codetoanalyze/cpp/errors/smart_ptr/weak_ptr_compil.cpp, weak_ptr_lock_repro_large::RDC::create::lambda_smart_ptr_weak_ptr_compil.cpp:62:7_operator(), 2, Cannot_star, [start of procedure operator(),Condition is true]
codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_local_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure basic_escape_local_bad(),return from a call to basic_escape_local_bad] codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_local_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure basic_escape_local_bad(),return from a call to basic_escape_local_bad]
codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_param_bad, 0, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure basic_escape_param_bad(),return from a call to basic_escape_param_bad] codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_param_bad, 0, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure basic_escape_param_bad(),return from a call to basic_escape_param_bad]
codetoanalyze/cpp/errors/stack_escape/basic.cpp, escape_local_struct_member_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure escape_local_struct_member_bad(),start of procedure EscapeTest,return from a call to EscapeTest_EscapeTest,return from a call to escape_local_struct_member_bad] codetoanalyze/cpp/errors/stack_escape/basic.cpp, escape_local_struct_member_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure escape_local_struct_member_bad(),start of procedure EscapeTest,return from a call to EscapeTest_EscapeTest,return from a call to escape_local_struct_member_bad]

@ -0,0 +1,32 @@
/*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <memory>
/* Compilation tests */
namespace shared_ptr_conv_from_derived {
/*
shared_ptr conversion does not work if inheritance is not public
*/
class Base {};
class Derived : public Base {};
class Q {
protected:
std::shared_ptr<Base> m_;
public:
void setM(std::shared_ptr<Base> m) { m_ = std::move(m); }
};
class P {
std::shared_ptr<Derived> m_;
Q q_;
void u() { q_.setM(m_); }
};
}

@ -0,0 +1,256 @@
/*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <memory>
extern "C" {
void __infer_fail(char*);
}
namespace weak_ptr_constructors {
struct Base {
int* f1;
Base(int* f1 = nullptr) : f1(f1) {}
};
struct Derived : public Base {
int* f2;
Derived(int* f1 = nullptr) : Base(f1) {}
};
std::weak_ptr<Base> empty() { return std::weak_ptr<Base>(); }
std::weak_ptr<Base> fromWeakBaseConstr(std::weak_ptr<Base> b) {
return std::weak_ptr<Base>(b);
}
std::weak_ptr<Base> fromWeakBaseAssign(std::weak_ptr<Base> b) {
std::weak_ptr<Base> result;
result = b;
return result;
}
std::weak_ptr<Base> fromWeakDerivedConstr(std::weak_ptr<Derived> d) {
return std::weak_ptr<Base>(d);
}
std::weak_ptr<Base> fromWeakDerivedAssign(std::weak_ptr<Derived> d) {
std::weak_ptr<Base> result;
result = d;
return result;
}
std::weak_ptr<Base> fromSharedBaseConstr(std::shared_ptr<Base> b) {
return std::weak_ptr<Base>(b);
}
std::weak_ptr<Base> fromSharedBaseAssign(std::shared_ptr<Base> b) {
std::weak_ptr<Base> result;
result = b;
return result;
}
std::weak_ptr<Base> fromSharedDerivedConstr(std::shared_ptr<Derived> d) {
return std::weak_ptr<Base>(d);
}
std::weak_ptr<Base> fromSharedDerivedConstr2(std::shared_ptr<Derived> d) {
std::weak_ptr<Derived> sd(d);
return std::weak_ptr<Base>(sd);
}
std::weak_ptr<Base> fromSharedDerivedAssign(std::shared_ptr<Derived> d) {
std::weak_ptr<Derived> sd(d);
std::weak_ptr<Base> result;
result = sd;
return result;
}
}
namespace weak_ptr_derefs {
using namespace weak_ptr_constructors;
int safeGetFromEmpty_good() {
auto w = empty();
auto s = w.lock();
while (!s)
;
return *s->f1; // never reached
}
std::shared_ptr<Base> safeGet(std::weak_ptr<Base> p) {
auto s = p.lock();
while (!s)
;
return s;
}
int safeGetFromWeakBaseConstr_bad(int v) {
auto b = std::make_shared<Base>(&v);
auto s = safeGet(fromWeakBaseConstr(std::weak_ptr<Base>(b)));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromWeakBaseAssign_bad(int v) {
auto b = std::make_shared<Base>(&v);
auto s = safeGet(fromWeakBaseAssign(std::weak_ptr<Base>(b)));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromWeakDerivedConstr_bad(int v) {
auto d = std::make_shared<Derived>(&v);
auto s = safeGet(fromWeakDerivedConstr(std::weak_ptr<Derived>(d)));
d->f1 = nullptr;
return *s->f1;
}
int safeGetFromWeakDerivedAssign_bad(int v) {
auto d = std::make_shared<Derived>(&v);
auto s = safeGet(fromWeakDerivedAssign(std::weak_ptr<Derived>(d)));
d->f1 = nullptr;
return *s->f1;
}
int safeGetFromSharedBaseConstr_bad(int v) {
auto b = std::make_shared<Base>(&v);
auto s = safeGet(fromSharedBaseConstr(b));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromSharedBaseAssign_bad(int v) {
auto b = std::make_shared<Base>(&v);
auto s = safeGet(fromSharedBaseAssign(b));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromSharedDerivedConstr_bad(int v) {
auto b = std::make_shared<Derived>(&v);
auto s = safeGet(fromSharedDerivedConstr(b));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromSharedDerivedConstr2_bad(int v) {
auto b = std::make_shared<Derived>(&v);
auto s = safeGet(fromSharedDerivedConstr2(b));
b->f1 = nullptr;
return *s->f1;
}
int safeGetFromSharedDerivedAssign_bad(int v) {
auto b = std::make_shared<Derived>(&v);
auto s = safeGet(fromSharedDerivedAssign(b));
b->f1 = nullptr;
return *s->f1;
}
}
namespace weak_ptr_modifiers {
void reset(std::weak_ptr<int>& p) { p.reset(); }
void swap(std::weak_ptr<int>& p) {
std::weak_ptr<int> q;
q.swap(p);
}
}
namespace weak_ptr_observers {
using namespace weak_ptr_constructors;
long use_count(std::weak_ptr<int>& p) { return p.use_count(); }
void use_count_empty_bad() {
std::weak_ptr<int> p;
if (p.use_count() == 0) {
__infer_fail("use_count on empty weak_ptr is 0");
}
}
void use_count_after_reset_bad(std::weak_ptr<int>& p) {
p.reset();
if (p.use_count() == 0) {
__infer_fail("use_count after weak_ptr reset is 0");
}
}
bool expired(std::weak_ptr<int>& p) { return p.expired(); }
void expired_empty_bad() {
std::weak_ptr<int> p;
if (p.expired()) {
__infer_fail("expired on empty weak_ptr is true");
}
}
void expired_after_reset_bad(std::weak_ptr<int>& p) {
p.reset();
if (p.expired()) {
__infer_fail("expired after weak_ptr reset is true");
}
}
void expired_after_swap_bad(std::weak_ptr<int>& p) {
std::weak_ptr<int> q;
q.swap(p);
if (p.expired()) {
__infer_fail("expired after weak_ptr swap with empty is true");
}
}
std::shared_ptr<int> lock(std::weak_ptr<int>& p) { return p.lock(); }
void empty_weak_lock_returns_null_bad() {
std::weak_ptr<int> p;
auto s = p.lock();
int _ = *s.get();
}
void expired_means_null_bad(std::weak_ptr<int>& p) {
if (p.expired()) {
auto s = p.lock();
int _ = *s.get();
}
}
void lock_can_be_null_bad(std::weak_ptr<int>& p) {
auto s = p.lock();
int _ = *s.get();
}
int safe_deref_good(std::weak_ptr<int>& p) {
if (auto s = p.lock()) {
return *s.get();
}
return 0;
}
std::shared_ptr<int> shared_still_in_scope_good_FP() {
/* It's not a big issue to FP in this case.
Code should not be written like that anyway. */
auto s = std::make_shared<int>();
auto p = std::weak_ptr<int>(s);
auto s2 = p.lock();
auto _ = *s2.get();
return s;
}
bool owner_before(std::weak_ptr<Base>& p, std::weak_ptr<Base>& q) {
return p.owner_before(q);
}
bool owner_before(std::weak_ptr<Base>& p, std::shared_ptr<Derived>& q) {
return p.owner_before(q);
}
}

@ -0,0 +1,91 @@
/*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <unordered_map>
/* Compilation tests */
namespace weak_ptr_lock_repro_small {
template <class T>
std::shared_ptr<T> joinT(std::shared_ptr<T> x) {
return x;
};
void foo(std::weak_ptr<int> p) {
auto self = p.lock();
std::shared_ptr<int> x = joinT(self);
}
}
namespace weak_ptr_lock_repro_large {
class S {
public:
template <typename T>
std::shared_ptr<T> joinT(std::shared_ptr<T> s);
};
class DCC {
public:
const std::shared_ptr<S>& s();
};
class DC {};
class CDM {
public:
std::shared_ptr<DC> gdc(std::function<DCC()>);
};
class RDC : DC {
public:
static std::shared_ptr<RDC> create(std::function<DCC()> cf);
private:
const std::shared_ptr<CDM> cdm;
mutable std::function<std::shared_ptr<DC>()> dcf;
};
std::shared_ptr<RDC> RDC::create(std::function<DCC()> cf) {
auto dc = std::make_shared<RDC>();
dc->dcf =
[ cf = std::move(cf),
weakSelf = std::weak_ptr<RDC>(dc) ]() mutable->std::shared_ptr<DC> {
if (auto self = weakSelf.lock()) {
return self->cdm->gdc([&]() mutable {
auto c = cf();
c.s()->joinT(self);
return c;
});
}
return nullptr;
};
return dc;
}
}
namespace weak_ptr_owner_less {
class K {};
class V {};
class C {
using S = std::set<std::weak_ptr<K>, std::owner_less<std::weak_ptr<K>>>;
std::
map<std::weak_ptr<K>, std::weak_ptr<V>, std::owner_less<std::weak_ptr<K>>>
m;
S s;
#ifdef INFER_USE_LIBCPP
/* requires Clang headers */
std::unordered_map<K, S> u;
#endif
};
}
Loading…
Cancel
Save