From 7aa199f7070aceeb3f7a0e51d3b2716e553c1174 Mon Sep 17 00:00:00 2001 From: Sam Blackshear Date: Fri, 15 Sep 2017 07:54:53 -0700 Subject: [PATCH] [clang] fix translation of placement new Summary: The "placement new" operator `new (e) T` constructs a `T` in the pre-allocated memory address `e`. We weren't translating the `e` part, which was leading to false positives in the dead store analysis. Reviewed By: dulmarod Differential Revision: D5814191 fbshipit-source-id: 05c6fa9 --- infer/src/IR/Exp.ml | 3 +- infer/src/clang/cTrans.ml | 98 +++++----- infer/src/clang/cTrans_utils.ml | 3 - infer/src/clang/cTrans_utils.mli | 2 - .../tests/codetoanalyze/cpp/errors/issues.exp | 116 ++++++----- .../cpp/frontend/builtin/new.cpp.dot | 2 +- .../cpp/liveness/dead_stores.cpp | 9 + .../codetoanalyze/cpp/liveness/issues.exp | 2 +- .../constructors/constructor_new.cpp.dot | 184 +++++++++++++----- .../shared/methods/virtual_methods.cpp.dot | 2 +- .../cpp/shared/types/inheritance.cpp.dot | 6 +- 11 files changed, 266 insertions(+), 161 deletions(-) diff --git a/infer/src/IR/Exp.ml b/infer/src/IR/Exp.ml index bbd6c2963..b707ccd89 100644 --- a/infer/src/IR/Exp.ml +++ b/infer/src/IR/Exp.ml @@ -189,7 +189,7 @@ let get_vars exp = -> (fst vars, pvar :: snd vars) | Var id -> (id :: fst vars, snd vars) - | Cast (_, e) | UnOp (_, e, _) | Lfield (e, _, _) | Exn e + | Cast (_, e) | UnOp (_, e, _) | Lfield (e, _, _) | Exn e | Sizeof {dynamic_length= Some e} -> get_vars_ e vars | BinOp (_, e1, e2) | Lindex (e1, e2) -> get_vars_ e1 vars |> get_vars_ e2 @@ -199,7 +199,6 @@ let get_vars exp = ~init:vars captured_vars | Const (Cint _ | Cfun _ | Cstr _ | Cfloat _ | Cclass _) -> vars - (* TODO: Sizeof dynamic length expressions may contain variables, do not ignore them. *) | Sizeof _ -> vars in diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index caa27b6d9..ba28a8c57 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -421,43 +421,46 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s whole type structure, to assign 0 values to all transitive fields because of AST construction in C translation *) let implicitValueInitExpr_trans trans_state stmt_info = - (* This node will always be child of InitListExpr, claiming priority will always fail *) - let var_exp_typ = extract_var_exp_or_fail trans_state in - let tenv = trans_state.context.CContext.tenv in - let sil_loc = CLocation.get_sil_location stmt_info trans_state.context in - let flatten_res_trans = collect_res_trans trans_state.context.procdesc in - (* Traverse structure of a type and initialize int/float/ptr fields with zero *) - let rec fill_typ_with_zero (exp, typ) : trans_result = - match typ.Typ.desc with - | Tstruct tn - -> let field_exps = - match Tenv.lookup tenv tn with - | Some {fields} - -> List.filter_map fields ~f:(fun (fieldname, fieldtype, _) -> - if Typ.Fieldname.is_hidden fieldname then None - else Some (Exp.Lfield (exp, fieldname, typ), fieldtype) ) - | None - -> assert false - in - List.map ~f:fill_typ_with_zero field_exps |> flatten_res_trans - | Tarray (field_typ, Some n, _) - -> let size = IntLit.to_int n in - let indices = CGeneral_utils.list_range 0 (size - 1) in - List.map indices ~f:(fun i -> - let idx_exp = Exp.Const (Const.Cint (IntLit.of_int i)) in - let field_exp = Exp.Lindex (exp, idx_exp) in - fill_typ_with_zero (field_exp, field_typ) ) - |> flatten_res_trans - | Tint _ | Tfloat _ | Tptr _ - -> let zero_exp = Sil.zero_value_of_numerical_type typ in - let instrs = [Sil.Store (exp, typ, zero_exp, sil_loc)] in - let exps = [(exp, typ)] in - {empty_res_trans with exps; instrs} - | Tfun _ | Tvoid | Tarray _ | TVar _ - -> CFrontend_config.unimplemented "fill_typ_with_zero on type %a" (Typ.pp Pp.text) typ - in - let res_trans = fill_typ_with_zero var_exp_typ in - {res_trans with initd_exps= [fst var_exp_typ]} + match trans_state.var_exp_typ with + | Some var_exp_typ + -> (* This node will always be child of InitListExpr, claiming priority will always fail *) + let tenv = trans_state.context.CContext.tenv in + let sil_loc = CLocation.get_sil_location stmt_info trans_state.context in + let flatten_res_trans = collect_res_trans trans_state.context.procdesc in + (* Traverse structure of a type and initialize int/float/ptr fields with zero *) + let rec fill_typ_with_zero (exp, typ) : trans_result = + match typ.Typ.desc with + | Tstruct tn + -> let field_exps = + match Tenv.lookup tenv tn with + | Some {fields} + -> List.filter_map fields ~f:(fun (fieldname, fieldtype, _) -> + if Typ.Fieldname.is_hidden fieldname then None + else Some (Exp.Lfield (exp, fieldname, typ), fieldtype) ) + | None + -> assert false + in + List.map ~f:fill_typ_with_zero field_exps |> flatten_res_trans + | Tarray (field_typ, Some n, _) + -> let size = IntLit.to_int n in + let indices = CGeneral_utils.list_range 0 (size - 1) in + List.map indices ~f:(fun i -> + let idx_exp = Exp.Const (Const.Cint (IntLit.of_int i)) in + let field_exp = Exp.Lindex (exp, idx_exp) in + fill_typ_with_zero (field_exp, field_typ) ) + |> flatten_res_trans + | Tint _ | Tfloat _ | Tptr _ + -> let zero_exp = Sil.zero_value_of_numerical_type typ in + let instrs = [Sil.Store (exp, typ, zero_exp, sil_loc)] in + let exps = [(exp, typ)] in + {empty_res_trans with exps; instrs} + | Tfun _ | Tvoid | Tarray _ | TVar _ + -> CFrontend_config.unimplemented "fill_typ_with_zero on type %a" (Typ.pp Pp.text) typ + in + let res_trans = fill_typ_with_zero var_exp_typ in + {res_trans with initd_exps= [fst var_exp_typ]} + | None + -> CFrontend_config.unimplemented "Retrieving var from non-InitListExpr parent" let no_op_trans succ_nodes = {empty_res_trans with root_nodes= succ_nodes} @@ -2031,8 +2034,13 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s -> (* This can happen with union initializers. Skip them for now *) [] and initListExpr_builtin_trans trans_state stmt_info stmts var_exp var_typ = - let stmt = match stmts with [s] -> s | _ -> assert false in - [init_expr_trans trans_state (var_exp, var_typ) stmt_info (Some stmt)] + match stmts with + | [stmt] + -> [init_expr_trans trans_state (var_exp, var_typ) stmt_info (Some stmt)] + | _ + -> CFrontend_config.unimplemented + "InitListExpression for var %a type %a with multiple init statements" Exp.pp var_exp + (Typ.pp_full Pp.text) var_typ (** InitListExpr can have following meanings: - initialize all record fields @@ -2070,7 +2078,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s match var_typ.Typ.desc with | Typ.Tarray (typ_inside, _, _) -> initListExpr_array_trans trans_state_pri init_stmt_info stmts var_exp typ_inside - | Typ.Tstruct _ + | Tstruct _ -> initListExpr_struct_trans trans_state_pri init_stmt_info stmts var_exp var_typ | Tint _ | Tfloat _ | Tptr _ -> initListExpr_builtin_trans trans_state_pri init_stmt_info stmts var_exp var_typ @@ -2643,7 +2651,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s let closure = Exp.Closure {name= lambda_pname; captured_vars} in {final_trans_result with exps= [(closure, typ)]} - and cxxNewExpr_trans trans_state stmt_info expr_info cxx_new_expr_info = + and cxxNewExpr_trans trans_state stmt_info stmt_list expr_info cxx_new_expr_info = + let instructions_trans_result = instructions trans_state stmt_list in let context = trans_state.context in let typ = CType_decl.get_type_from_expr_info expr_info context.tenv in let sil_loc = CLocation.get_sil_location stmt_info context in @@ -2709,7 +2718,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s let result_trans_to_parent = PriorityNode.compute_results_to_parent trans_state_pri sil_loc nname stmt_info all_res_trans in - {result_trans_to_parent with exps= res_trans_new.exps} + collect_res_trans context.CContext.procdesc + [instructions_trans_result; {result_trans_to_parent with exps= res_trans_new.exps}] and cxxDeleteExpr_trans trans_state stmt_info stmt_list delete_expr_info = let context = trans_state.context in @@ -3141,8 +3151,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s -> stringLiteral_trans trans_state expr_info "" | BinaryConditionalOperator (stmt_info, stmts, expr_info) -> binaryConditionalOperator_trans trans_state stmt_info stmts expr_info - | CXXNewExpr (stmt_info, _, expr_info, cxx_new_expr_info) - -> cxxNewExpr_trans trans_state stmt_info expr_info cxx_new_expr_info + | CXXNewExpr (stmt_info, stmt_list, expr_info, cxx_new_expr_info) + -> cxxNewExpr_trans trans_state stmt_info stmt_list expr_info cxx_new_expr_info | CXXDeleteExpr (stmt_info, stmt_list, _, delete_expr_info) -> cxxDeleteExpr_trans trans_state stmt_info stmt_list delete_expr_info | MaterializeTemporaryExpr (stmt_info, stmt_list, expr_info, _) diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index 64c9c1c00..c39aca8a9 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -196,9 +196,6 @@ let collect_res_trans pdesc l = let rt = collect l empty_res_trans in {rt with instrs= List.rev rt.instrs; exps= List.rev rt.exps; initd_exps= List.rev rt.initd_exps} -let extract_var_exp_or_fail transt_state = - match transt_state.var_exp_typ with Some var_exp_typ -> var_exp_typ | None -> assert false - (* priority_node is used to enforce some kind of policy for creating nodes *) (* in the cfg. Certain elements of the AST _must_ create nodes therefore *) (* there is no need for them to use priority_node. Certain elements *) diff --git a/infer/src/clang/cTrans_utils.mli b/infer/src/clang/cTrans_utils.mli index 71fd1d296..9e763fd0a 100644 --- a/infer/src/clang/cTrans_utils.mli +++ b/infer/src/clang/cTrans_utils.mli @@ -42,8 +42,6 @@ val undefined_expression : unit -> Exp.t val collect_res_trans : Procdesc.t -> trans_result list -> trans_result -val extract_var_exp_or_fail : trans_state -> Exp.t * Typ.t - val is_return_temp : continuation option -> bool val ids_to_parent : continuation option -> Ident.t list -> Ident.t list diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index 4ac388474..12ac9d85b 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -1,3 +1,7 @@ +INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared, 1, MEMORY_LEAK, [start of procedure std::make_shared(),Skipping lol: function or method not found] +INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared, 1, MEMORY_LEAK, [start of procedure std::make_shared(),start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base] +INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared, 1, MEMORY_LEAK, [start of procedure std::make_shared(),start of procedure Derived,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,return from a call to weak_ptr_constructors::Derived_Derived,start of procedure Derived,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,return from a call to weak_ptr_constructors::Derived_Derived] +INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared, 1, MEMORY_LEAK, [start of procedure std::make_shared(),start of procedure RDC,start of procedure DC,return from a call to weak_ptr_lock_repro_large::DC_DC,return from a call to weak_ptr_lock_repro_large::RDC_RDC,start of procedure RDC,start of procedure DC,return from a call to weak_ptr_lock_repro_large::DC_DC,return from a call to weak_ptr_lock_repro_large::RDC_RDC] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_fgetc, 4, NULL_DEREFERENCE, [start of procedure crash_fgetc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_getc, 4, NULL_DEREFERENCE, [start of procedure crash_getc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, malloc_fail_gets_reported, 2, NULL_DEREFERENCE, [start of procedure malloc_fail_gets_reported()] @@ -10,8 +14,11 @@ codetoanalyze/cpp/errors/include_header/header2.h, header2::B_div0, codetoanalyze/cpp/errors/include_header/header2.h, header2::B_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0] codetoanalyze/cpp/errors/include_header/header2.h, header2::div0_templ, 1, DIVIDE_BY_ZERO, [start of procedure header2::div0_templ()] codetoanalyze/cpp/errors/include_header/header2.h, header2::div0_templ, 1, DIVIDE_BY_ZERO, [start of procedure header2::div0_templ()] -codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 4, MEMORY_LEAK, [start of procedure leak()] -codetoanalyze/cpp/errors/memory_leaks/object_leak.cpp, object_leak, 0, MEMORY_LEAK, [start of procedure object_leak(),start of procedure Rectangle,return from a call to Rectangle_Rectangle] +codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 1, MEMORY_LEAK, [start of procedure leak()] +codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure leak()] +codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, no_leak, 1, MEMORY_LEAK, [start of procedure no_leak()] +codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, no_leak, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure no_leak()] +codetoanalyze/cpp/errors/memory_leaks/object_leak.cpp, object_leak, 0, MEMORY_LEAK, [start of procedure object_leak(),start of procedure Rectangle,return from a call to Rectangle_Rectangle,start of procedure Rectangle,return from a call to Rectangle_Rectangle] codetoanalyze/cpp/errors/memory_leaks/raii_malloc.cpp, memory_leak, 0, MEMORY_LEAK, [start of procedure memory_leak()] codetoanalyze/cpp/errors/models/atomic.cpp, atomic_test::compare_exchange_strong_possible_npe1_bad, 6, NULL_DEREFERENCE, [start of procedure atomic_test::compare_exchange_strong_possible_npe1_bad(),Condition is true,Condition is true,Condition is true] codetoanalyze/cpp/errors/models/atomic.cpp, atomic_test::compare_exchange_strong_possible_npe2_bad, 6, NULL_DEREFERENCE, [start of procedure atomic_test::compare_exchange_strong_possible_npe2_bad(),Condition is true,Condition is true,Condition is false,Condition is true] @@ -69,21 +76,21 @@ codetoanalyze/cpp/errors/npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe, 2 codetoanalyze/cpp/errors/npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe_person, 2, NULL_DEREFERENCE, [start of procedure npe_added_to_b1::causes_npe_person(),start of procedure Person,return from a call to npe_added_to_b1::Person_Person,start of procedure npe_added_to_b1::deref_person()] codetoanalyze/cpp/errors/npe/null_returned_by_method.cpp, testNullDeref, 3, NULL_DEREFERENCE, [start of procedure testNullDeref(),Condition is true,start of procedure getNull,return from a call to XFactory_getNull] codetoanalyze/cpp/errors/npe/object_deref.cpp, object_deref::derefNullField, 2, NULL_DEREFERENCE, [start of procedure object_deref::derefNullField(),start of procedure object_deref::getNull(),return from a call to object_deref::getNull] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, const_skip2_then_split_case, 5, MEMORY_LEAK, [start of procedure const_skip2_then_split_case(),Skipping skip_const2(): function or method not found,start of procedure test_pointer(),Condition is true,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, const_skip_then_split_case, 6, MEMORY_LEAK, [start of procedure const_skip_then_split_case(),Skipping skip_const(): function or method not found,start of procedure test_pointer(),Condition is true,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case, 2, MEMORY_LEAK, [start of procedure skip_then_split_case(),Skipping skip_no_const(): function or method not found] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case, 5, NULL_DEREFERENCE, [start of procedure skip_then_split_case(),Skipping skip_no_const(): function or method not found,start of procedure test_pointer(),Condition is false,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, typedef_skip_then_split_case, 2, MEMORY_LEAK, [start of procedure typedef_skip_then_split_case(),Skipping skip_typedef(): function or method not found] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, typedef_skip_then_split_case, 4, NULL_DEREFERENCE, [start of procedure typedef_skip_then_split_case(),Skipping skip_typedef(): function or method not found,start of procedure test_pointer(),Condition is false,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case, 5, NULL_DEREFERENCE, [start of procedure skip_then_split_case(),Skipping std::make_shared(): function or method not found,Skipping skip_no_const(): function or method not found,start of procedure test_pointer(),Condition is false,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, typedef_skip_then_split_case, 4, NULL_DEREFERENCE, [start of procedure typedef_skip_then_split_case(),Skipping std::make_shared(): function or method not found,Skipping skip_typedef(): function or method not found,start of procedure test_pointer(),Condition is false,return from a call to test_pointer] codetoanalyze/cpp/errors/numeric/min_max.cpp, max_X_inv_div0, 2, DIVIDE_BY_ZERO, [start of procedure max_X_inv_div0(),start of procedure X_inv,return from a call to X_inv_X_inv,start of procedure X_inv,return from a call to X_inv_X_inv] codetoanalyze/cpp/errors/numeric/min_max.cpp, max_int_div0, 0, DIVIDE_BY_ZERO, [start of procedure max_int_div0()] codetoanalyze/cpp/errors/numeric/min_max.cpp, min_X_div0, 2, DIVIDE_BY_ZERO, [start of procedure min_X_div0(),start of procedure X,return from a call to X_X,start of procedure X,return from a call to X_X] codetoanalyze/cpp/errors/numeric/min_max.cpp, min_int_div0, 0, DIVIDE_BY_ZERO, [start of procedure min_int_div0()] codetoanalyze/cpp/errors/overwrite_attribute/main.cpp, testSetIntValue, 3, DIVIDE_BY_ZERO, [start of procedure testSetIntValue(),start of procedure setIntValue(),return from a call to setIntValue] -codetoanalyze/cpp/errors/pointers/unintialized.cpp, known_ctor_dangling_bad, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure known_ctor_dangling_bad(),start of procedure TestDangling,return from a call to TestDangling_TestDangling] -codetoanalyze/cpp/errors/pointers/unintialized.cpp, known_ctor_dangling_bad, 2, UNINITIALIZED_VALUE, [start of procedure known_ctor_dangling_bad(),start of procedure TestDangling,return from a call to TestDangling_TestDangling] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, initialized_no_dangling_ok, 1, MEMORY_LEAK, [start of procedure initialized_no_dangling_ok()] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, initialized_no_dangling_ok, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure initialized_no_dangling_ok()] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, known_ctor_dangling_bad, 1, MEMORY_LEAK, [start of procedure known_ctor_dangling_bad(),start of procedure TestDangling,return from a call to TestDangling_TestDangling,start of procedure TestDangling,return from a call to TestDangling_TestDangling] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, known_ctor_dangling_bad, 1, UNINITIALIZED_VALUE, [start of procedure known_ctor_dangling_bad(),start of procedure TestDangling,return from a call to TestDangling_TestDangling] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, known_ctor_dangling_bad, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure known_ctor_dangling_bad(),start of procedure TestDangling,return from a call to TestDangling_TestDangling,start of procedure TestDangling,return from a call to TestDangling_TestDangling] codetoanalyze/cpp/errors/pointers/unintialized.cpp, uninitialized_dangling_bad, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure uninitialized_dangling_bad()] codetoanalyze/cpp/errors/pointers/unintialized.cpp, uninitialized_dangling_bad, 2, UNINITIALIZED_VALUE, [start of procedure uninitialized_dangling_bad()] +codetoanalyze/cpp/errors/pointers/unintialized.cpp, unknown_ctor_assume_no_dangling_ok, 1, MEMORY_LEAK, [start of procedure unknown_ctor_assume_no_dangling_ok(),Skipping TestDangling: function or method not found] codetoanalyze/cpp/errors/resource_leaks/raii.cpp, resource_leak, 7, RESOURCE_LEAK, [start of procedure resource_leak(),Condition is false] codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const1, 3, NULL_DEREFERENCE, [start of procedure test_const1()] codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_const2, 2, NULL_DEREFERENCE, [start of procedure test_const2()] @@ -93,9 +100,8 @@ codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile1, 3, N codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile2, 2, NULL_DEREFERENCE, [start of procedure test_volatile2()] codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile3, 3, NULL_DEREFERENCE, [start of procedure test_volatile3()] codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile4, 2, NULL_DEREFERENCE, [start of procedure test_volatile4()] -codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE, [start of procedure deref_after_mode_example::deref_after_move_crash(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure access_age] -codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_ok, 3, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_after_move_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure ~Person,return from a call to deref_after_mode_example::Person_~Person] -codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 2, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,start of procedure ~Person,return from a call to deref_after_mode_example::Person_~Person] +codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::Person_Person, 1, MEMORY_LEAK, [start of procedure Person] +codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE, [start of procedure deref_after_mode_example::deref_after_move_crash(),Skipping Person: function or method not found,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure access_age] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::aliasing_member_null_bad, 4, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::aliasing_member_null_bad(),start of procedure shared_ptr_constructors::aliasing_construct_from_internal(),start of procedure shared_ptr_constructors::internal_null_def(),Skipping shared_ptr_constructors::external_def(): function or method not found,return from a call to shared_ptr_constructors::internal_null_def,Condition is true,Condition is false,return from a call to shared_ptr_constructors::aliasing_construct_from_internal] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_null_f1_deref, 6, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::get_from_base1_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_nullptr_deref, 0, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::get_from_base1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] @@ -153,22 +159,22 @@ 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_ok_deref, 3, MEMORY_LEAK, [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/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_derefs::safeGetFromSharedBaseAssign_bad, 4, NULL_DEREFERENCE, [start of procedure weak_ptr_derefs::safeGetFromSharedBaseAssign_bad(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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(),Skipping std::make_shared(): function or method not found,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::shared_still_in_scope_good_FP, 6, NULL_DEREFERENCE, [start of procedure weak_ptr_observers::shared_still_in_scope_good_FP(),Skipping std::make_shared(): function or method not found] 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,Skipping function: function or method not found] @@ -179,15 +185,20 @@ codetoanalyze/cpp/errors/stack_escape/basic.cpp, escape_local_struct_member_bad, codetoanalyze/cpp/errors/static_local/nonstatic_local_bad.cpp, nonstatic_local_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, [start of procedure nonstatic_local_bad(),return from a call to nonstatic_local_bad] codetoanalyze/cpp/errors/static_local/nonstatic_local_bad.cpp, nonstatic_local_caller, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure nonstatic_local_caller(),start of procedure nonstatic_local_bad(),return from a call to nonstatic_local_bad] codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp, cast_with_enforce::cast_with_npe, 3, NULL_DEREFERENCE, [start of procedure cast_with_enforce::cast_with_npe(),start of procedure Base,return from a call to cast_with_enforce::Base_Base] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightPointerCast, 4, DIVIDE_BY_ZERO, [start of procedure dynamic__cast::rightPointerCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,Condition is true] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightPointerCast, 4, MEMORY_LEAK, [start of procedure dynamic__cast::rightPointerCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,Condition is true] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightReferenceCast, 2, MEMORY_LEAK, [start of procedure dynamic__cast::rightReferenceCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightPointerCast, 1, MEMORY_LEAK, [start of procedure dynamic__cast::rightPointerCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightPointerCast, 1, UNINITIALIZED_VALUE, [start of procedure dynamic__cast::rightPointerCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightPointerCast, 4, DIVIDE_BY_ZERO, [start of procedure dynamic__cast::rightPointerCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,Condition is true] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightReferenceCast, 1, MEMORY_LEAK, [start of procedure dynamic__cast::rightReferenceCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived,start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::rightReferenceCast, 1, UNINITIALIZED_VALUE, [start of procedure dynamic__cast::rightReferenceCast(),start of procedure Derived,start of procedure Base,return from a call to dynamic__cast::Base_Base,return from a call to dynamic__cast::Derived_Derived] codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongCastOfArgumentPointer, 2, DIVIDE_BY_ZERO, [start of procedure dynamic__cast::wrongCastOfArgumentPointer(),start of procedure Base,return from a call to dynamic__cast::Base_Base,start of procedure dynamic__cast::castOfArgumentPointer(),Condition is false,return from a call to dynamic__cast::castOfArgumentPointer] codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongCastOfArgumentReference, 2, CLASS_CAST_EXCEPTION, [start of procedure dynamic__cast::wrongCastOfArgumentReference(),start of procedure Base,return from a call to dynamic__cast::Base_Base] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 2, MEMORY_LEAK, [start of procedure dynamic__cast::wrongPointerCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 6, DIVIDE_BY_ZERO, [start of procedure dynamic__cast::wrongPointerCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base,Condition is false] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCast, 3, CLASS_CAST_EXCEPTION, [start of procedure dynamic__cast::wrongReferenceCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base] -codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCastNotAssigned, 3, CLASS_CAST_EXCEPTION, [start of procedure dynamic__cast::wrongReferenceCastNotAssigned(),start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 1, MEMORY_LEAK, [start of procedure dynamic__cast::wrongPointerCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base,start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 1, UNINITIALIZED_VALUE, [start of procedure dynamic__cast::wrongPointerCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 6, DIVIDE_BY_ZERO, [start of procedure dynamic__cast::wrongPointerCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base,start of procedure Base,return from a call to dynamic__cast::Base_Base,Condition is false] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCast, 1, MEMORY_LEAK, [start of procedure dynamic__cast::wrongReferenceCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base,start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCast, 1, UNINITIALIZED_VALUE, [start of procedure dynamic__cast::wrongReferenceCast(),start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCastNotAssigned, 1, MEMORY_LEAK, [start of procedure dynamic__cast::wrongReferenceCastNotAssigned(),start of procedure Base,return from a call to dynamic__cast::Base_Base,start of procedure Base,return from a call to dynamic__cast::Base_Base] +codetoanalyze/cpp/errors/subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCastNotAssigned, 1, UNINITIALIZED_VALUE, [start of procedure dynamic__cast::wrongReferenceCastNotAssigned(),start of procedure Base,return from a call to dynamic__cast::Base_Base] codetoanalyze/cpp/errors/subtyping/implicit_cast_with_const.cpp, implicit_cast_with_const::BaseDerefNPE, 2, NULL_DEREFERENCE, [start of procedure implicit_cast_with_const::BaseDerefNPE(),start of procedure Base,return from a call to implicit_cast_with_const::Base_Base,start of procedure implicit_cast_with_const::deref()] codetoanalyze/cpp/errors/subtyping/implicit_cast_with_const.cpp, implicit_cast_with_const::DerivedDerefNPE, 2, NULL_DEREFERENCE, [start of procedure implicit_cast_with_const::DerivedDerefNPE(),start of procedure Derived,start of procedure Base,return from a call to implicit_cast_with_const::Base_Base,return from a call to implicit_cast_with_const::Derived_Derived,start of procedure implicit_cast_with_const::deref()] codetoanalyze/cpp/errors/subtyping/subtyping_check.cpp, B_setFG, 4, DIVIDE_BY_ZERO, [start of procedure setFG,start of procedure setF,return from a call to A_setF,Condition is true] @@ -249,31 +260,25 @@ codetoanalyze/cpp/shared/constructors/constructor_init.cpp, delegate_constr_f_di codetoanalyze/cpp/shared/constructors/constructor_init.cpp, f2_div0, 2, DIVIDE_BY_ZERO, [start of procedure f2_div0(),start of procedure B,start of procedure A,return from a call to A_A,start of procedure T,return from a call to B::T_T,return from a call to B_B] codetoanalyze/cpp/shared/constructors/constructor_init.cpp, f_div0, 2, DIVIDE_BY_ZERO, [start of procedure f_div0(),start of procedure B,start of procedure A,return from a call to A_A,start of procedure T,return from a call to B::T_T,return from a call to B_B] codetoanalyze/cpp/shared/constructors/constructor_init.cpp, t_div0, 2, DIVIDE_BY_ZERO, [start of procedure t_div0(),start of procedure B,start of procedure A,return from a call to A_A,start of procedure T,return from a call to B::T_T,return from a call to B_B] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::array_of_class_with_not_constant_size, 1, MEMORY_LEAK, [start of procedure constructor_new::array_of_class_with_not_constant_size(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::array_of_person_with_constant_size, 0, MEMORY_LEAK, [start of procedure constructor_new::array_of_person_with_constant_size(),start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::constructor_1_arg_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, MEMORY_LEAK, [start of procedure constructor_new::constructor_1_arg_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::constructor_3_args_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, MEMORY_LEAK, [start of procedure constructor_new::constructor_3_args_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, DIVIDE_BY_ZERO, [start of procedure constructor_new::constructor_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false,start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, MEMORY_LEAK, [start of procedure constructor_new::constructor_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false,start of procedure Person,return from a call to constructor_new::Person_Person] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::float_init_number()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 2, MEMORY_LEAK, [start of procedure constructor_new::float_init_number()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array, 4, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_array(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array, 4, MEMORY_LEAK, [start of procedure constructor_new::int_array(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array_init, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_array_init()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array_init, 2, MEMORY_LEAK, [start of procedure constructor_new::int_array_init()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_init_empty()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, MEMORY_LEAK, [start of procedure constructor_new::int_init_empty()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::array_of_person_with_constant_size, 0, MEMORY_LEAK, [start of procedure constructor_new::array_of_person_with_constant_size(),start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 1, MEMORY_LEAK, [start of procedure constructor_new::constructor_1_arg_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 1, MEMORY_LEAK, [start of procedure constructor_new::constructor_3_args_new_div0(),start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::constructor_nodes, 2, MEMORY_LEAK, [start of procedure constructor_new::constructor_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 1, MEMORY_LEAK, [start of procedure constructor_new::float_init_number()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::float_init_number()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array, 1, MEMORY_LEAK, [start of procedure constructor_new::int_array(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_array, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::int_array(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is true,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 1, MEMORY_LEAK, [start of procedure constructor_new::int_init_empty()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, NULL_DEREFERENCE, [start of procedure constructor_new::int_init_empty()] codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_init_empty_list()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_init_empty_list_new()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, MEMORY_LEAK, [start of procedure constructor_new::int_init_empty_list_new()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 3, MEMORY_LEAK, [start of procedure constructor_new::int_init_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_init_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, MEMORY_LEAK, [start of procedure constructor_new::int_init_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 2, DIVIDE_BY_ZERO, [start of procedure constructor_new::int_init_number()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 2, MEMORY_LEAK, [start of procedure constructor_new::int_init_number()] -codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::matrix_of_person, 2, MEMORY_LEAK, [start of procedure constructor_new::matrix_of_person(),start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person,start of procedure Person,return from a call to constructor_new::Person_Person] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 1, MEMORY_LEAK, [start of procedure constructor_new::int_init_empty_list_new()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::int_init_empty_list_new()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 2, MEMORY_LEAK, [start of procedure constructor_new::int_init_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 3, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::int_init_nodes(),start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,start of procedure constructor_new::getValue(),return from a call to constructor_new::getValue,Condition is false] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 1, MEMORY_LEAK, [start of procedure constructor_new::int_init_number()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::int_init_number()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::matrix_of_person, 1, MEMORY_LEAK, [start of procedure constructor_new::matrix_of_person()] +codetoanalyze/cpp/shared/constructors/constructor_new.cpp, constructor_new::matrix_of_person, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure constructor_new::matrix_of_person(),start of procedure Person,return from a call to constructor_new::Person_Person] codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp, constructor_with_body::test_div0, 2, DIVIDE_BY_ZERO, [start of procedure constructor_with_body::test_div0(),start of procedure X,start of procedure init,return from a call to constructor_with_body::X_init,return from a call to constructor_with_body::X_X,start of procedure div] codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp, constructor_with_body::test_div0_default_constructor, 2, DIVIDE_BY_ZERO, [start of procedure constructor_with_body::test_div0_default_constructor(),start of procedure X,start of procedure init,return from a call to constructor_with_body::X_init,return from a call to constructor_with_body::X_X,start of procedure div] codetoanalyze/cpp/shared/constructors/copy_array_field.cpp, copy_array_field::npe, 4, NULL_DEREFERENCE, [start of procedure copy_array_field::npe(),start of procedure X,return from a call to copy_array_field::X_X,start of procedure X,return from a call to copy_array_field::X_X] @@ -296,6 +301,9 @@ codetoanalyze/cpp/shared/methods/conversion_operator.cpp, conversion_operator::b codetoanalyze/cpp/shared/methods/conversion_operator.cpp, conversion_operator::y_branch_div0, 6, DIVIDE_BY_ZERO, [start of procedure conversion_operator::y_branch_div0(),start of procedure Y,return from a call to conversion_operator::Y_Y,start of procedure operator_X,start of procedure X,return from a call to conversion_operator::X_X,start of procedure X,return from a call to conversion_operator::X_X,return from a call to conversion_operator::Y_operator_X,start of procedure X,return from a call to conversion_operator::X_X,start of procedure operator_bool,return from a call to conversion_operator::X_operator_bool,Condition is true,start of procedure operator_X,start of procedure X,return from a call to conversion_operator::X_X,start of procedure X,return from a call to conversion_operator::X_X,return from a call to conversion_operator::Y_operator_X,start of procedure X,return from a call to conversion_operator::X_X,start of procedure operator_int,return from a call to conversion_operator::X_operator_int] codetoanalyze/cpp/shared/methods/static.cpp, div0_class, 0, DIVIDE_BY_ZERO, [start of procedure div0_class(),start of procedure fun] codetoanalyze/cpp/shared/methods/static.cpp, div0_instance, 2, DIVIDE_BY_ZERO, [start of procedure div0_instance(),start of procedure fun] +codetoanalyze/cpp/shared/methods/virtual_methods.cpp, call_virtual_destructor, 1, MEMORY_LEAK, [start of procedure call_virtual_destructor(),start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle,start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle] +codetoanalyze/cpp/shared/methods/virtual_methods.cpp, call_virtual_destructor, 1, UNINITIALIZED_VALUE, [start of procedure call_virtual_destructor(),start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle] +codetoanalyze/cpp/shared/methods/virtual_methods.cpp, call_virtual_destructor, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure call_virtual_destructor(),start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle,start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle] codetoanalyze/cpp/shared/methods/virtual_methods.cpp, poly_area, 3, DIVIDE_BY_ZERO, [start of procedure poly_area(),start of procedure Polygon,return from a call to Polygon_Polygon,start of procedure area,return from a call to Polygon_area] codetoanalyze/cpp/shared/methods/virtual_methods.cpp, rect_area, 4, DIVIDE_BY_ZERO, [start of procedure rect_area(),start of procedure Rectangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Rectangle_Rectangle,start of procedure set_values,return from a call to Polygon_set_values,start of procedure area,return from a call to Rectangle_area] codetoanalyze/cpp/shared/methods/virtual_methods.cpp, tri_area, 5, DIVIDE_BY_ZERO, [start of procedure tri_area(),start of procedure Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,return from a call to Triangle_Triangle,start of procedure Polygon,return from a call to Polygon_Polygon,start of procedure set_values,return from a call to Polygon_set_values,start of procedure area,return from a call to Triangle_area] diff --git a/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot index 9187b7cf2..eba00846a 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot @@ -18,7 +18,7 @@ digraph iCFG { "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_5" [label="5: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 12]\n *&i:int*=n$2 [line 12]\n " shape="box"] - "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_5" -> "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_4" ; + "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_5" -> "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_3" ; "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_6" [label="6: DeclStmt \n *&x:int=2 [line 11]\n " shape="box"] diff --git a/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp b/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp index cb3c49ab2..7351cca58 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp +++ b/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +#include + namespace dead_stores { void easy_bad() { int x = 5; } @@ -233,4 +235,11 @@ void FP_assign_array_tricky_ok() { // looks like &arr:int = 123 } +void placement_new_ok(int len, int* ptr) { + int* placement = ptr; + while (len--) { + new (placement++) int(5); + } +} + } diff --git a/infer/tests/codetoanalyze/cpp/liveness/issues.exp b/infer/tests/codetoanalyze/cpp/liveness/issues.exp index 5b7742869..70468c247 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/issues.exp +++ b/infer/tests/codetoanalyze/cpp/liveness/issues.exp @@ -4,7 +4,7 @@ codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::dead_then_live_bad, 1, codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::easy_bad, 0, DEAD_STORE, [Write of unused value] codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::init_capture_no_call_bad, 1, DEAD_STORE, [Write of unused value] codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::init_capture_reassign_bad, 1, DEAD_STORE, [Write of unused value] -codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::lambda_bad::lambda_dead_stores.cpp:145:11_operator(), 1, DEAD_STORE, [Write of unused value] +codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::lambda_bad::lambda_dead_stores.cpp:147:11_operator(), 1, DEAD_STORE, [Write of unused value] codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::plus_plus1_bad, 2, DEAD_STORE, [Write of unused value] codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::plus_plus2_bad, 2, DEAD_STORE, [Write of unused value] codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::plus_plus3_bad, 2, DEAD_STORE, [Write of unused value] diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot index f890dd06f..4940d2b65 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot @@ -11,7 +11,7 @@ digraph iCFG { "constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_3" -> "constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_2" ; -"constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 30]\n _fun_constructor_new::Person_Person(n$2:constructor_new::Person*,5:int) [line 30]\n *&p:constructor_new::Person*=n$2 [line 30]\n " shape="box"] +"constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_4" [label="4: DeclStmt \n _fun_constructor_new::Person_Person(&p:constructor_new::Person**,5:int) [line 30]\n n$2=*&p:constructor_new::Person* [line 30]\n n$3=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 30]\n _fun_constructor_new::Person_Person(n$3:constructor_new::Person*,5:int) [line 30]\n " shape="box"] "constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_4" -> "constructor_1_arg_new_div0#constructor_new#_ZN15constructor_new26constructor_1_arg_new_div0Ev.e48b160e92759af5ada2d63fe2aea4ef_3" ; @@ -26,7 +26,7 @@ digraph iCFG { "constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_3" -> "constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_2" ; -"constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 35]\n _fun_constructor_new::Person_Person(n$2:constructor_new::Person*,5:int,6:int,7:int) [line 35]\n *&p:constructor_new::Person*=n$2 [line 35]\n " shape="box"] +"constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_4" [label="4: DeclStmt \n _fun_constructor_new::Person_Person(&p:constructor_new::Person**,5:int,6:int,7:int) [line 35]\n n$2=*&p:constructor_new::Person* [line 35]\n n$3=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 35]\n _fun_constructor_new::Person_Person(n$3:constructor_new::Person*,5:int,6:int,7:int) [line 35]\n " shape="box"] "constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_4" -> "constructor_3_args_new_div0#constructor_new#_ZN15constructor_new27constructor_3_args_new_div0Ev.df5aeff70858c5bbb476055a2255d835_3" ; @@ -41,7 +41,7 @@ digraph iCFG { "int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_3" -> "int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_2" ; -"int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 40]\n *n$2:int=5 [line 40]\n *&x1:int*=n$2 [line 40]\n " shape="box"] +"int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 40]\n *n$2:int=5 [line 40]\n *&x1:int=-1 [line 40]\n " shape="box"] "int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_4" -> "int_init_number#constructor_new#_ZN15constructor_new15int_init_numberEv.74f74b86aa6fe41870b0bdfc0065a8d9_3" ; @@ -56,7 +56,7 @@ digraph iCFG { "float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_3" -> "float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_2" ; -"float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=float):unsigned long) [line 45]\n *n$2:float=5.400000 [line 45]\n *&x1:float*=n$2 [line 45]\n " shape="box"] +"float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=float):unsigned long) [line 45]\n *n$2:float=5.400000 [line 45]\n *&x1:int=-1 [line 45]\n " shape="box"] "float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_4" -> "float_init_number#constructor_new#_ZN15constructor_new17float_init_numberEv.9d2e3b49e4536b7a481871c0e17cf6ac_3" ; @@ -71,7 +71,7 @@ digraph iCFG { "int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_3" -> "int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_2" ; -"int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 50]\n *n$2:int=0 [line 50]\n *&x1:int*=n$2 [line 50]\n " shape="box"] +"int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_4" [label="4: DeclStmt \n *&x1:int*=null [line 50]\n n$2=_fun___new(sizeof(t=int):unsigned long) [line 50]\n *n$2:int=0 [line 50]\n " shape="box"] "int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_4" -> "int_init_empty#constructor_new#_ZN15constructor_new14int_init_emptyEv.046a4172487408e1c4d40e2b9438262c_3" ; @@ -101,14 +101,14 @@ digraph iCFG { "int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_3" -> "int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_2" ; -"int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 60]\n *n$2:int=0 [line 60]\n *&x1:int*=n$2 [line 60]\n " shape="box"] +"int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_4" [label="4: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 60]\n *n$2:int=0 [line 60]\n *&x1:int=-1 [line 60]\n " shape="box"] "int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_4" -> "int_init_empty_list_new#constructor_new#_ZN15constructor_new23int_init_empty_list_newEv.f221adb6b6c841b803e147c25d3204de_3" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_1" [label="1: Start constructor_new::int_init_nodes\nFormals: \nLocals: x:int* 0$?%__sil_tmpSIL_temp_conditional___n$3:int y:int* z:int \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$3,&y,&z); [line 64]\n " color=yellow style=filled] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_1" [label="1: Start constructor_new::int_init_nodes\nFormals: \nLocals: x:int* 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$9:int y:int* z:int \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$9,&y,&z); [line 64]\n " color=yellow style=filled] - "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_1" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" ; + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_1" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_18" ; "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_2" [label="2: Exit constructor_new::int_init_nodes \n " color=yellow style=filled] @@ -119,44 +119,69 @@ digraph iCFG { "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_4" [label="4: + \n " ] - "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_4" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" [label="5: Call _fun_constructor_new::getValue \n n$4=_fun_constructor_new::getValue(0:int) [line 67]\n " shape="box"] + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_4" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" [label="5: Call _fun_constructor_new::getValue \n n$3=_fun_constructor_new::getValue(0:int) [line 67]\n " shape="box"] "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_6" ; "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_7" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_6" [label="6: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 67]\n " shape="invhouse"] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_6" [label="6: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 67]\n " shape="invhouse"] "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_6" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_8" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_7" [label="7: Prune (false branch) \n PRUNE((n$4 == 0), false); [line 67]\n " shape="invhouse"] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_7" [label="7: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 67]\n " shape="invhouse"] "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_7" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_9" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_8" [label="8: ConditinalStmt Branch \n n$5=_fun_constructor_new::getValue(1:int) [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int=n$5 [line 67]\n " shape="box"] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_8" [label="8: ConditinalStmt Branch \n n$4=_fun_constructor_new::getValue(1:int) [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int=n$4 [line 67]\n " shape="box"] "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_8" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_4" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_9" [label="9: ConditinalStmt Branch \n n$6=*&y:int* [line 67]\n n$7=*n$6:int [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int=(1 + n$7) [line 67]\n " shape="box"] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_9" [label="9: ConditinalStmt Branch \n n$5=*&y:int* [line 67]\n n$6=*n$5:int [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int=(1 + n$6) [line 67]\n " shape="box"] "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_9" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_4" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" [label="10: DeclStmt \n n$2=_fun___new(sizeof(t=int):unsigned long) [line 67]\n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 67]\n *n$2:int=n$8 [line 67]\n *&x:int*=n$2 [line 67]\n " shape="box"] +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" [label="10: + \n " ] - "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_3" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" [label="11: DeclStmt \n n$9=_fun___new(sizeof(t=int):unsigned long) [line 66]\n n$10=_fun_constructor_new::getValue(4:int) [line 66]\n *n$9:int=n$10 [line 66]\n *&y:int*=n$9 [line 66]\n " shape="box"] + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_16" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" [label="11: Call _fun_constructor_new::getValue \n n$10=_fun_constructor_new::getValue(0:int) [line 67]\n " shape="box"] - "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" ; -"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" [label="12: DeclStmt \n *&z:int=6 [line 65]\n " shape="box"] + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" ; + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_13" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" [label="12: Prune (true branch) \n PRUNE((n$10 != 0), true); [line 67]\n " shape="invhouse"] - "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_11" ; -"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_1" [label="1: Start constructor_new::constructor_nodes\nFormals: \nLocals: p:constructor_new::Person* 0$?%__sil_tmpSIL_temp_conditional___n$3:int z:int \n DECLARE_LOCALS(&return,&p,&0$?%__sil_tmpSIL_temp_conditional___n$3,&z); [line 71]\n " color=yellow style=filled] + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_12" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_14" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_13" [label="13: Prune (false branch) \n PRUNE((n$10 == 0), false); [line 67]\n " shape="invhouse"] - "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_1" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" ; + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_13" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_15" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_14" [label="14: ConditinalStmt Branch \n n$11=_fun_constructor_new::getValue(1:int) [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:int=n$11 [line 67]\n " shape="box"] + + + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_14" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_15" [label="15: ConditinalStmt Branch \n n$12=*&y:int* [line 67]\n n$13=*n$12:int [line 67]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:int=(1 + n$13) [line 67]\n " shape="box"] + + + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_15" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_10" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_16" [label="16: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 67]\n n$8=_fun___new(sizeof(t=int):unsigned long) [line 67]\n n$14=*&0$?%__sil_tmpSIL_temp_conditional___n$9:int [line 67]\n *n$8:int=n$14 [line 67]\n *&x:int=-1 [line 67]\n " shape="box"] + + + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_16" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_3" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_17" [label="17: DeclStmt \n n$15=_fun_constructor_new::getValue(4:int) [line 66]\n n$16=_fun___new(sizeof(t=int):unsigned long) [line 66]\n n$17=_fun_constructor_new::getValue(4:int) [line 66]\n *n$16:int=n$17 [line 66]\n *&y:int=-1 [line 66]\n " shape="box"] + + + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_17" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_5" ; +"int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_18" [label="18: DeclStmt \n *&z:int=6 [line 65]\n " shape="box"] + + + "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_18" -> "int_init_nodes#constructor_new#_ZN15constructor_new14int_init_nodesEv.858899e8400ad728f4d32816a5f41567_17" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_1" [label="1: Start constructor_new::constructor_nodes\nFormals: \nLocals: p:constructor_new::Person* 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_temp_conditional___n$9:int z:int \n DECLARE_LOCALS(&return,&p,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_temp_conditional___n$9,&z); [line 71]\n " color=yellow style=filled] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_1" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_17" ; "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_2" [label="2: Exit constructor_new::constructor_nodes \n " color=yellow style=filled] @@ -167,7 +192,7 @@ digraph iCFG { "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_4" [label="4: + \n " ] - "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_4" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" ; + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_4" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" ; "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_5" [label="5: Call _fun_constructor_new::getValue \n n$4=_fun_constructor_new::getValue(0:int) [line 73]\n " shape="box"] @@ -189,15 +214,40 @@ digraph iCFG { "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_9" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_4" ; -"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" [label="10: DeclStmt \n n$2=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 73]\n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 73]\n _fun_constructor_new::Person_Person(n$2:constructor_new::Person*,n$7:int) [line 73]\n *&p:constructor_new::Person*=n$2 [line 73]\n " shape="box"] +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" [label="10: + \n " ] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_16" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" [label="11: Call _fun_constructor_new::getValue \n n$10=_fun_constructor_new::getValue(0:int) [line 73]\n " shape="box"] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_12" ; + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_13" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_12" [label="12: Prune (true branch) \n PRUNE((n$10 != 0), true); [line 73]\n " shape="invhouse"] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_12" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_14" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_13" [label="13: Prune (false branch) \n PRUNE((n$10 == 0), false); [line 73]\n " shape="invhouse"] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_13" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_15" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_14" [label="14: ConditinalStmt Branch \n n$11=_fun_constructor_new::getValue(1:int) [line 73]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:int=n$11 [line 73]\n " shape="box"] - "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_3" ; -"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" [label="11: DeclStmt \n *&z:int=6 [line 72]\n " shape="box"] + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_14" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_15" [label="15: ConditinalStmt Branch \n n$12=*&z:int [line 73]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:int=(1 + n$12) [line 73]\n " shape="box"] - "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_11" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_5" ; -"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_1" [label="1: Start constructor_new::int_array\nFormals: \nLocals: x2:int* 0$?%__sil_tmpSIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&x2,&0$?%__sil_tmpSIL_temp_conditional___n$6); [line 77]\n " color=yellow style=filled] + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_15" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_10" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_16" [label="16: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 73]\n _fun_constructor_new::Person_Person(&p:constructor_new::Person**,n$7:int) [line 73]\n n$2=*&p:constructor_new::Person* [line 73]\n n$8=_fun___new(sizeof(t=constructor_new::Person):unsigned long) [line 73]\n n$13=*&0$?%__sil_tmpSIL_temp_conditional___n$9:int [line 73]\n _fun_constructor_new::Person_Person(n$8:constructor_new::Person*,n$13:int) [line 73]\n " shape="box"] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_16" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_3" ; +"constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_17" [label="17: DeclStmt \n *&z:int=6 [line 72]\n " shape="box"] + + + "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_17" -> "constructor_nodes#constructor_new#_ZN15constructor_new17constructor_nodesEv.5507b612f713c15c069700c4572bd706_5" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_1" [label="1: Start constructor_new::int_array\nFormals: \nLocals: x2:int* 0$?%__sil_tmpSIL_temp_conditional___n$6:int 0$?%__sil_tmpSIL_temp_conditional___n$10:int \n DECLARE_LOCALS(&return,&x2,&0$?%__sil_tmpSIL_temp_conditional___n$6,&0$?%__sil_tmpSIL_temp_conditional___n$10); [line 77]\n " color=yellow style=filled] "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_1" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_7" ; @@ -219,7 +269,7 @@ digraph iCFG { "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_6" [label="6: + \n " ] - "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_6" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" ; + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_6" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_13" ; "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_7" [label="7: Call _fun_constructor_new::getValue \n n$7=_fun_constructor_new::getValue(5:int) [line 78]\n " shape="box"] @@ -241,26 +291,36 @@ digraph iCFG { "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_11" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_6" ; -"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" [label="12: DeclStmt \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 78]\n n$10=_fun___new_array((sizeof(t=int) * n$9):unsigned long) [line 78]\n *&x2:int*=n$10 [line 78]\n " shape="box"] +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" [label="12: + \n " ] + + + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_18" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_13" [label="13: Call _fun_constructor_new::getValue \n n$11=_fun_constructor_new::getValue(5:int) [line 78]\n " shape="box"] + + + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_13" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_14" ; + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_13" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_15" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_14" [label="14: Prune (true branch) \n PRUNE((n$11 != 0), true); [line 78]\n " shape="invhouse"] - "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_5" ; -"int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_1" [label="1: Start constructor_new::int_array_init\nFormals: \nLocals: arr:int* \n DECLARE_LOCALS(&return,&arr); [line 84]\n " color=yellow style=filled] + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_14" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_16" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_15" [label="15: Prune (false branch) \n PRUNE((n$11 == 0), false); [line 78]\n " shape="invhouse"] - "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_1" -> "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_4" ; -"int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_2" [label="2: Exit constructor_new::int_array_init \n " color=yellow style=filled] + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_15" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_17" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_16" [label="16: ConditinalStmt Branch \n n$12=_fun_constructor_new::getValue(5:int) [line 78]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:int=n$12 [line 78]\n " shape="box"] -"int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_3" [label="3: Return Stmt \n n$0=*&arr:int* [line 86]\n n$1=*n$0[0]:int [line 86]\n n$2=*&arr:int* [line 86]\n n$3=*n$2[1]:int [line 86]\n n$4=*&arr:int* [line 86]\n n$5=*n$4[2]:int [line 86]\n n$6=*&arr:int* [line 86]\n n$7=*n$6[3]:int [line 86]\n n$8=*&arr:int* [line 86]\n n$9=*n$8[4]:int [line 86]\n *&return:int=(1 / (((((n$1 + n$3) + n$5) + n$7) + n$9) - 15)) [line 86]\n " shape="box"] + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_16" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_17" [label="17: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$10:int=3 [line 78]\n " shape="box"] - "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_3" -> "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_2" ; -"int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_4" [label="4: DeclStmt \n n$10=_fun___new_array((sizeof(t=int) * 100):unsigned long) [line 85]\n *n$10[0]:int=1 [line 85]\n *n$10[1]:int=2 [line 85]\n *n$10[2]:int=3 [line 85]\n *n$10[3]:int=4 [line 85]\n *n$10[4]:int=5 [line 85]\n *n$10[5]:int=6 [line 85]\n *n$10[6]:int=7 [line 85]\n *n$10[7]:int=8 [line 85]\n *n$10[8]:int=9 [line 85]\n *n$10[9]:int=10 [line 85]\n *&arr:int*=n$10 [line 85]\n " shape="box"] + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_17" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_12" ; +"int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_18" [label="18: DeclStmt \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 78]\n n$13=*&0$?%__sil_tmpSIL_temp_conditional___n$10:int [line 78]\n n$14=_fun___new_array((sizeof(t=int) * n$13):unsigned long) [line 78]\n *&x2:int=-1 [line 78]\n " shape="box"] - "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_4" -> "int_array_init#constructor_new#_ZN15constructor_new14int_array_initEv.4384d20d025c33e626184b2890ab90a4_3" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_1" [label="1: Start constructor_new::array_of_class_with_not_constant_size\nFormals: \nLocals: tarray:constructor_new::Person* 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&tarray,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 90]\n " color=yellow style=filled] + "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_18" -> "int_array#constructor_new#_ZN15constructor_new9int_arrayEv.a50200812a1b313e9b04a48becffcace_5" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_1" [label="1: Start constructor_new::array_of_class_with_not_constant_size\nFormals: \nLocals: tarray:constructor_new::Person* 0$?%__sil_tmpSIL_temp_conditional___n$1:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int \n DECLARE_LOCALS(&return,&tarray,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmpSIL_temp_conditional___n$4); [line 90]\n " color=yellow style=filled] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_1" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_4" ; @@ -270,32 +330,56 @@ digraph iCFG { "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_3" [label="3: + \n " ] - "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_3" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_4" [label="4: BinaryOperatorStmt: EQ \n n$1=_fun_constructor_new::getValue(5:int) [line 91]\n " shape="box"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_4" [label="4: BinaryOperatorStmt: EQ \n n$2=_fun_constructor_new::getValue(5:int) [line 91]\n " shape="box"] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_4" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_5" ; "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_4" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_6" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_5" [label="5: Prune (true branch) \n PRUNE(((n$1 == 5) != 0), true); [line 91]\n " shape="invhouse"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_5" [label="5: Prune (true branch) \n PRUNE(((n$2 == 5) != 0), true); [line 91]\n " shape="invhouse"] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_5" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_7" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_6" [label="6: Prune (false branch) \n PRUNE(((n$1 == 5) == 0), false); [line 91]\n " shape="invhouse"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_6" [label="6: Prune (false branch) \n PRUNE(((n$2 == 5) == 0), false); [line 91]\n " shape="invhouse"] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_6" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_8" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_7" [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=5 [line 91]\n " shape="box"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_7" [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=5 [line 91]\n " shape="box"] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_7" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_3" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_8" [label="8: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=3 [line 91]\n " shape="box"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_8" [label="8: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=3 [line 91]\n " shape="box"] "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_8" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_3" ; -"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" [label="9: DeclStmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 91]\n n$3=_fun___new_array((sizeof(t=constructor_new::Person) * n$2):unsigned long) [line 91]\n *&tarray:constructor_new::Person*=n$3 [line 91]\n " shape="box"] +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" [label="9: + \n " ] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_15" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_10" [label="10: BinaryOperatorStmt: EQ \n n$5=_fun_constructor_new::getValue(5:int) [line 91]\n " shape="box"] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_10" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_11" ; + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_10" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_12" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_11" [label="11: Prune (true branch) \n PRUNE(((n$5 == 5) != 0), true); [line 91]\n " shape="invhouse"] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_11" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_13" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_12" [label="12: Prune (false branch) \n PRUNE(((n$5 == 5) == 0), false); [line 91]\n " shape="invhouse"] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_12" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_14" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_13" [label="13: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int=5 [line 91]\n " shape="box"] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_13" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_14" [label="14: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int=3 [line 91]\n " shape="box"] + + + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_14" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" ; +"array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_15" [label="15: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 91]\n _fun_constructor_new::Person_Person(&tarray:constructor_new::Person**) [line 91]\n n$0=*&tarray:constructor_new::Person* [line 91]\n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 91]\n n$7=_fun___new_array((sizeof(t=constructor_new::Person) * n$6):unsigned long) [line 91]\n " shape="box"] - "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_9" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_2" ; + "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_15" -> "array_of_class_with_not_constant_size#constructor_new#_ZN15constructor_new37array_of_class_with_not_.2dafa043eedc2a4cf36407ab92f39294_2" ; "array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_1" [label="1: Start constructor_new::array_of_person_with_constant_size\nFormals: \nLocals: tarray:constructor_new::Person* \n DECLARE_LOCALS(&return,&tarray); [line 95]\n " color=yellow style=filled] @@ -303,7 +387,7 @@ digraph iCFG { "array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_2" [label="2: Exit constructor_new::array_of_person_with_constant_size \n " color=yellow style=filled] -"array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_3" [label="3: DeclStmt \n n$0=_fun___new_array((sizeof(t=constructor_new::Person) * 10):unsigned long) [line 95]\n _fun_constructor_new::Person_Person(n$0[0]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[1]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[2]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[3]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[4]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[5]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[6]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[7]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[8]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$0[9]:constructor_new::Person[_*_](*)) [line 95]\n *&tarray:constructor_new::Person*=n$0 [line 95]\n " shape="box"] +"array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_3" [label="3: DeclStmt \n _fun_constructor_new::Person_Person(&tarray:constructor_new::Person**) [line 95]\n n$0=*&tarray:constructor_new::Person* [line 95]\n n$1=_fun___new_array((sizeof(t=constructor_new::Person) * 10):unsigned long) [line 95]\n _fun_constructor_new::Person_Person(n$1[0]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[1]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[2]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[3]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[4]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[5]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[6]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[7]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[8]:constructor_new::Person[_*_](*)) [line 95]\n _fun_constructor_new::Person_Person(n$1[9]:constructor_new::Person[_*_](*)) [line 95]\n " shape="box"] "array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_3" -> "array_of_person_with_constant_size#constructor_new#_ZN15constructor_new34array_of_person_with_consta.216f1e02a6e135eec1b8bbd6115403a9_2" ; @@ -314,11 +398,11 @@ digraph iCFG { "matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_2" [label="2: Exit constructor_new::matrix_of_person \n " color=yellow style=filled] -"matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&tarray:constructor_new::Person** [line 100]\n n$1=_fun___new_array((sizeof(t=constructor_new::Person) * 10):unsigned long) [line 100]\n _fun_constructor_new::Person_Person(n$1[0]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[1]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[2]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[3]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[4]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[5]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[6]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[7]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[8]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$1[9]:constructor_new::Person[_*_](*)) [line 100]\n *n$0[0]:constructor_new::Person*=n$1 [line 100]\n " shape="box"] +"matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&tarray:constructor_new::Person** [line 100]\n _fun_constructor_new::Person_Person(n$0[0]:constructor_new::Person**) [line 100]\n n$1=*n$0[0]:constructor_new::Person* [line 100]\n n$2=_fun___new_array((sizeof(t=constructor_new::Person) * 10):unsigned long) [line 100]\n _fun_constructor_new::Person_Person(n$2[0]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[1]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[2]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[3]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[4]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[5]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[6]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[7]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[8]:constructor_new::Person[_*_](*)) [line 100]\n _fun_constructor_new::Person_Person(n$2[9]:constructor_new::Person[_*_](*)) [line 100]\n " shape="box"] "matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_3" -> "matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_2" ; -"matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_4" [label="4: DeclStmt \n n$2=_fun___new_array((sizeof(t=constructor_new::Person*) * 10):unsigned long) [line 99]\n *&tarray:constructor_new::Person**=n$2 [line 99]\n " shape="box"] +"matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_4" [label="4: DeclStmt \n n$3=_fun___new_array((sizeof(t=constructor_new::Person*) * 10):unsigned long) [line 99]\n *&tarray:int=-1 [line 99]\n " shape="box"] "matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_4" -> "matrix_of_person#constructor_new#_ZN15constructor_new16matrix_of_personEv.6eca49c294523e3080fbda7d175061b6_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot index ca8c0dfc8..78e45e4bc 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot @@ -107,7 +107,7 @@ digraph iCFG { "call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_3" -> "call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_2" ; -"call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_4" [label="4: DeclStmt \n n$1=_fun___new(sizeof(t=Triangle):unsigned long) [line 71]\n _fun_Triangle_Triangle(n$1:Triangle*) [line 71]\n *&trgl:Triangle*=n$1 [line 71]\n " shape="box"] +"call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_4" [label="4: DeclStmt \n _fun_Triangle_Triangle(&trgl:Polygon**) [line 71]\n n$1=*&trgl:Polygon* [line 71]\n n$2=_fun___new(sizeof(t=Triangle):unsigned long) [line 71]\n _fun_Triangle_Triangle(n$2:Triangle*) [line 71]\n " shape="box"] "call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_4" -> "call_virtual_destructor#_Z23call_virtual_destructorv.c49554769ae5a95a20567435741c5c0d_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot index 8b676875c..824dd6496 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot @@ -31,15 +31,15 @@ digraph iCFG { "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_8" -> "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_7" ; -"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_9" [label="9: DeclStmt \n n$18=_fun___new(sizeof(t=Sub):unsigned long) [line 24]\n _fun_Sub_Sub(n$18:Sub*) [line 24]\n *&s2:Sub*=n$18 [line 24]\n " shape="box"] +"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_9" [label="9: DeclStmt \n _fun_Sub_Sub(&s2:Sub**) [line 24]\n n$18=*&s2:Sub* [line 24]\n n$19=_fun___new(sizeof(t=Sub):unsigned long) [line 24]\n _fun_Sub_Sub(n$19:Sub*) [line 24]\n " shape="box"] "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_9" -> "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_8" ; -"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_10" [label="10: DeclStmt \n n$19=_fun___new(sizeof(t=Sub):unsigned long) [line 23]\n _fun_Sub_Sub(n$19:Sub*) [line 23]\n *&s1:Sub*=n$19 [line 23]\n " shape="box"] +"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_10" [label="10: DeclStmt \n _fun_Sub_Sub(&s1:Base**) [line 23]\n n$20=*&s1:Base* [line 23]\n n$21=_fun___new(sizeof(t=Sub):unsigned long) [line 23]\n _fun_Sub_Sub(n$21:Sub*) [line 23]\n " shape="box"] "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_10" -> "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_9" ; -"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_11" [label="11: DeclStmt \n n$20=_fun___new(sizeof(t=Base):unsigned long) [line 22]\n _fun_Base_Base(n$20:Base*) [line 22]\n *&b:Base*=n$20 [line 22]\n " shape="box"] +"call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_11" [label="11: DeclStmt \n _fun_Base_Base(&b:Base**) [line 22]\n n$22=*&b:Base* [line 22]\n n$23=_fun___new(sizeof(t=Base):unsigned long) [line 22]\n _fun_Base_Base(n$23:Base*) [line 22]\n " shape="box"] "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_11" -> "call_static_methods#_Z19call_static_methodsv.8f6d53f5ba8026b1f1c82b61375a3dfc_10" ;