Summary:
This was left as a TODO before: where to place calls to destructors for
C++ temporaries that are only conditionally creating when evaluating an
expression. This can happen inside the branches of a conditional
operation `b?e:f` or in potentially-short-circuited conditions on the
righ-hand side of `&&` and `||` operators.
Following the compilation scheme of clang (observed by looking at the
generated LLVM bitcode), we instrument the program with "marker"
variables, so that for instance `X x = true?X():y;` becomes (following
the execution on the true branch):
```
marker1 = 0; // initialize all markers to 0
PRUNE(true) // entering true branch
X::X(&temporary); // create temporary...
marker1 = 1; // ...triggers setting its marker to 1
X::X(&x, &temporary); // finish expression
if (marker1) {
X::~X(&temporary); // conditionally destroy the temporary
}
```
In this diff, you'll find code for:
- associating markers to temporaries that need them
- code to initialize markers to 0 before full-expressions
- code to conditionally destroy temporaries based on the values of the
markers once the full-expression has finished evaluating
Reviewed By: da319
Differential Revision: D24954070
fbshipit-source-id: cf15df7f7
master
Jules Villard4 years agocommitted byFacebook GitHub Bot
codetoanalyze/cpp/biabduction/models/cmp.cpp, std_not_equal_to_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure std_not_equal_to_bad(),Condition is false,Taking true branch]
codetoanalyze/cpp/biabduction/models/move.cpp, move::div0_moved_from, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure move::div0_moved_from(),start of procedure X,return from a call to move::X::X,start of procedure X,return from a call to move::X::X]
codetoanalyze/cpp/biabduction/models/move.cpp, move::div0_moved_to, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure move::div0_moved_to(),start of procedure X,return from a call to move::X::X,start of procedure X,return from a call to move::X::X]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null0_bad_FN, 3, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null0_bad_FN(),start of procedure pair::pairOfZeroNull(),return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null1_bad, 3, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null1_bad(),start of procedure pair::pairOfZeroNull(),return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null_guard_ok_FP, 4, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null_guard_ok_FP(),start of procedure pair::pairOfZeroNull(),return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation,Taking true branch]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null0_bad_FN, 3, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null0_bad_FN(),start of procedure pair::pairOfZeroNull(),Skipping ~pair: method has no implementation,return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null1_bad, 3, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null1_bad(),start of procedure pair::pairOfZeroNull(),Skipping ~pair: method has no implementation,return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation]
codetoanalyze/cpp/biabduction/models/pair.cpp, pair::deref_pair_null_guard_ok_FP, 4, DANGLING_POINTER_DEREFERENCE, no_bucket, ERROR, [start of procedure pair::deref_pair_null_guard_ok_FP(),start of procedure pair::pairOfZeroNull(),Skipping ~pair: method has no implementation,return from a call to pair::pairOfZeroNull,Skipping ~pair: method has no implementation,Taking true branch]
codetoanalyze/cpp/biabduction/models/swap.cpp, swap_null_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure swap_null_bad()]
codetoanalyze/cpp/biabduction/models/throw_wrapper.cpp, nothrow_if_null_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure nothrow_if_null_bad(),start of procedure get_null(),return from a call to get_null,Taking true branch,start of procedure do_nothing(),return from a call to do_nothing]
codetoanalyze/cpp/biabduction/mutex/std_mutex.cpp, ends_locked, 3, Cannot_star, no_bucket, ERROR, [start of procedure ends_locked(),Loop condition is true. Entering loop body,start of procedure ensure_unlocked(),start of procedure ensure_locked(),Skipping try_lock: method has no implementation,return from a call to ensure_locked,Skipping unlock: method has no implementation,return from a call to ensure_unlocked]
codetoanalyze/cpp/biabduction/npe/boxed_ptr.cpp, boxed_ptr::smart_ptr_result_method_null_deref, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure boxed_ptr::smart_ptr_result_method_null_deref(),start of procedure SmartPtr,return from a call to boxed_ptr::SmartPtr::SmartPtr,start of procedure X,return from a call to boxed_ptr::X::X,start of procedure get,return from a call to boxed_ptr::SmartPtr::get,start of procedure getNull,return from a call to boxed_ptr::X::getNull]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref2_bad(),start of procedure cancellation_test::is_size_zero(),start of procedure begin,return from a call to cancellation_test::Test::begin,start of procedure end,return from a call to cancellation_test::Test::end,Condition is false,return from a call to cancellation_test::is_size_zero,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref_bad(),start of procedure cancellation_test::is_size_zero(),start of procedure begin,return from a call to cancellation_test::Test::begin,start of procedure end,return from a call to cancellation_test::Test::end,Condition is false,return from a call to cancellation_test::is_size_zero,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref_iter2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref_iter2_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is false,return from a call to cancellation_test::operator==,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref_iter_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref_iter_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is false,return from a call to cancellation_test::operator==,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref_iter2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref_iter2_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is false,return from a call to cancellation_test::operator==,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_nonzero_deref_iter_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_nonzero_deref_iter_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is false,return from a call to cancellation_test::operator==,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref2_bad(),start of procedure cancellation_test::is_size_zero(),start of procedure begin,return from a call to cancellation_test::Test::begin,start of procedure end,return from a call to cancellation_test::Test::end,Condition is true,return from a call to cancellation_test::is_size_zero,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref_bad(),start of procedure cancellation_test::is_size_zero(),start of procedure begin,return from a call to cancellation_test::Test::begin,start of procedure end,return from a call to cancellation_test::Test::end,Condition is true,return from a call to cancellation_test::is_size_zero,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref_iter2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref_iter2_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is true,return from a call to cancellation_test::operator==,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref_iter_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref_iter_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is true,return from a call to cancellation_test::operator==,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref_iter2_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref_iter2_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is true,return from a call to cancellation_test::operator==,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/cancellation.cpp, cancellation_test::size_zero_deref_iter_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure cancellation_test::size_zero_deref_iter_bad(),start of procedure cancellation_test::is_size_zero_iter(),start of procedure begin_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::begin_iter,start of procedure end_iter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,start of procedure TestIter,return from a call to cancellation_test::TestIter::TestIter,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::Test::end_iter,start of procedure cancellation_test::operator==(),Condition is true,return from a call to cancellation_test::operator==,Skipping ~TestIter: method has no implementation,return from a call to cancellation_test::is_size_zero_iter,Taking true branch]
codetoanalyze/cpp/biabduction/npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe_person_bad, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure npe_added_to_b1::causes_npe_person_bad(),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/biabduction/npe/null_returned_by_method.cpp, testNullDeref, 3, NULL_DEREFERENCE, B2, ERROR, [start of procedure testNullDeref(),Taking true branch,start of procedure getNull,return from a call to XFactory::getNull]
codetoanalyze/cpp/biabduction/npe/object_deref.cpp, object_deref::derefNullField, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure object_deref::derefNullField(),start of procedure object_deref::getNull(),return from a call to object_deref::getNull]
codetoanalyze/cpp/shared/constructors/copy_array_field.cpp, copy_array_field::npe, 4, NULL_DEREFERENCE, B1, ERROR, [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]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyX_div0, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::copyX_div0(),start of procedure X,return from a call to copy_move_constructor::X::X,start of procedure X,return from a call to copy_move_constructor::X::X]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyY_div0, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::copyY_div0(),start of procedure Y,return from a call to copy_move_constructor::Y::Y,start of procedure Y,return from a call to copy_move_constructor::Y::Y]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X::X,start of procedure X,return from a call to copy_move_constructor::X::X,Skipping ~X: method has no implementation,return from a call to copy_move_constructor::getX]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y::Y,start of procedure Y,return from a call to copy_move_constructor::Y::Y,Skipping ~Y: method has no implementation,return from a call to copy_move_constructor::getY]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X::X,start of procedure X,return from a call to copy_move_constructor::X::X,Skipping ~X: method has no implementation,return from a call to copy_move_constructor::getX,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y::Y,start of procedure Y,return from a call to copy_move_constructor::Y::Y,Skipping ~Y: method has no implementation,return from a call to copy_move_constructor::getY,Skipping ~Y: method has no implementation]
codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure copy_move_constructor::moveY_moveY_copyY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y::Y,start of procedure Y,return from a call to copy_move_constructor::Y::Y,Skipping ~Y: method has no implementation,return from a call to copy_move_constructor::getY,start of procedure Y,return from a call to copy_move_constructor::Y::Y,Skipping ~Y: method has no implementation,start of procedure Y,return from a call to copy_move_constructor::Y::Y]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::assign_temp_div0, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::assign_temp_div0(),start of procedure X,return from a call to temp_object::X::X,start of procedure X,return from a call to temp_object::X::X,Skipping ~X: method has no implementation,start of procedure div]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::getX_field_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X::X,start of procedure X,return from a call to temp_object::X::X,return from a call to temp_object::getX,start of procedure temp_object::div()]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::getX_method_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X::X,start of procedure X,return from a call to temp_object::X::X,return from a call to temp_object::getX,start of procedure div]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::getX_field_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X::X,start of procedure X,return from a call to temp_object::X::X,Skipping ~X: method has no implementation,return from a call to temp_object::getX,start of procedure temp_object::div()]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::getX_method_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X::X,start of procedure X,return from a call to temp_object::X::X,Skipping ~X: method has no implementation,return from a call to temp_object::getX,start of procedure div]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::temp_field2_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::temp_field2_div0(),start of procedure X,return from a call to temp_object::X::X,start of procedure temp_object::div()]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::temp_field_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::temp_field_div0(),start of procedure X,return from a call to temp_object::X::X,start of procedure temp_object::div()]
codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::temp_method_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure temp_object::temp_method_div0(),start of procedure X,return from a call to temp_object::X::X,start of procedure div]
@ -209,7 +209,7 @@ codetoanalyze/cpp/shared/lambda/lambda1.cpp, bar, 5, DIVIDE_BY_ZERO, no_bucket,
codetoanalyze/cpp/shared/lambda/lambda1.cpp, foo, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure foo(),start of procedure ,return from a call to foo::lambda_shared_lambda_lambda1.cpp:17:17::,Skipping ~: method has no implementation,start of procedure ,return from a call to foo::lambda_shared_lambda_lambda1.cpp:18:12::,Skipping ~: method has no implementation,start of procedure operator(),return from a call to foo::lambda_shared_lambda_lambda1.cpp:18:12::operator()]
codetoanalyze/cpp/shared/lambda/lambda1.cpp, foo::lambda_shared_lambda_lambda1.cpp:17:17::operator(), 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure operator()]
codetoanalyze/cpp/shared/methods/conversion_operator.cpp, conversion_operator::branch_div0, 4, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure conversion_operator::branch_div0(),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,Taking true branch,start of procedure operator_int,return from a call to conversion_operator::X::operator_int]
codetoanalyze/cpp/shared/methods/conversion_operator.cpp, conversion_operator::y_branch_div0, 6, DIVIDE_BY_ZERO, no_bucket, ERROR, [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,Taking true branch,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,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/methods/conversion_operator.cpp, conversion_operator::y_branch_div0, 6, DIVIDE_BY_ZERO, no_bucket, ERROR, [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,Skipping ~X: method has no implementation,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,Taking true branch,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,Skipping ~X: method has no implementation,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,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/methods/static.cpp, div0_class, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure div0_class(),start of procedure fun]
codetoanalyze/cpp/shared/methods/static.cpp, div0_instance, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure div0_instance(),start of procedure fun]
codetoanalyze/cpp/shared/methods/virtual_methods.cpp, poly_area, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [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/types/operator_overload.cpp, div0_method_op, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure div0_method_op(),start of procedure operator[],return from a call to X::operator[]]
codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method_op_ptr, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure div0_method_op_ptr(),start of procedure operator[],return from a call to X::operator[]]
codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure return_struct::get_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get,Skipping ~X: method has no implementation,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get]
codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get,Skipping ~X: method has no implementation,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure return_struct::get_method_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X::X,start of procedure X,return from a call to return_struct::X::X,Skipping ~X: method has no implementation,return from a call to return_struct::get,start of procedure div]
codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_Y_div0, 7, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_forward_declare::X_Y_div0(),start of procedure X,return from a call to struct_forward_declare::X::X,Taking false branch,start of procedure getF,return from a call to struct_forward_declare::X::getF]
codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_div0, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_forward_declare::X_div0(),start of procedure X,return from a call to struct_forward_declare::X::X,start of procedure getF,return from a call to struct_forward_declare::X::getF]
codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::Z_ptr_div0, 5, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_forward_declare::Z_ptr_div0(),start of procedure getF,return from a call to struct_forward_declare::Z::getF]
codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp, struct_pass_by_value::field_div0, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_pass_by_value::field_div0(),start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure Y,start of procedure X,return from a call to struct_pass_by_value::X::X,return from a call to struct_pass_by_value::Y::Y,start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure struct_pass_by_value::get_f(),return from a call to struct_pass_by_value::get_f]
codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp, struct_pass_by_value::param_get_copied_div0, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_pass_by_value::param_get_copied_div0(),start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure struct_pass_by_value::set_f(),return from a call to struct_pass_by_value::set_f]
codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp, struct_pass_by_value::temp_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_pass_by_value::temp_div0(),start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure struct_pass_by_value::get_f(),return from a call to struct_pass_by_value::get_f]
codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp, struct_pass_by_value::temp_div0, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_pass_by_value::temp_div0(),start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure struct_pass_by_value::get_f(),return from a call to struct_pass_by_value::get_f,Skipping ~X: method has no implementation]
codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp, struct_pass_by_value::var_div0, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure struct_pass_by_value::var_div0(),start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure X,return from a call to struct_pass_by_value::X::X,start of procedure struct_pass_by_value::get_f(),return from a call to struct_pass_by_value::get_f]
codetoanalyze/cpp/pulse/closures.cpp, struct_capture_by_val_bad, 7, NULLPTR_DEREFERENCE, no_bucket, ERROR, [invalidation part of the trace starts here,assigned,is the null pointer,use-after-lifetime part of the trace starts here,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/closures.cpp, struct_capture_by_val_ok_FP, 7, NULLPTR_DEREFERENCE, no_bucket, ERROR, [invalidation part of the trace starts here,assigned,is the null pointer,use-after-lifetime part of the trace starts here,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/closures.cpp, update_inside_lambda_as_argument_ok_FP, 1, NULLPTR_DEREFERENCE, no_bucket, ERROR, [invalidation part of the trace starts here,when calling `update_inside_lambda_as_argument` here,assigned,is the null pointer,use-after-lifetime part of the trace starts here,passed as argument to `update_inside_lambda_as_argument`,return from call to `update_inside_lambda_as_argument`,invalid access occurs here]
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::FP_track_copy_operations_complex_ok, 16, NULLPTR_DEREFERENCE, no_bucket, ERROR, [invalidation part of the trace starts here,assigned,is the null pointer,use-after-lifetime part of the trace starts here,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::FP_track_copy_operations_one_copy_ok, 17, NULLPTR_DEREFERENCE, no_bucket, ERROR, [invalidation part of the trace starts here,assigned,is the null pointer,use-after-lifetime part of the trace starts here,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/conditionals.cpp, add_test3_latent, 3, USE_AFTER_FREE, no_bucket, ERROR, [*** LATENT ***,invalidation part of the trace starts here,parameter `x` of add_test3_latent,was invalidated by call to `free()`,use-after-lifetime part of the trace starts here,parameter `x` of add_test3_latent,invalid access occurs here]
codetoanalyze/cpp/pulse/conditionals.cpp, add_test5_latent, 5, USE_AFTER_FREE, no_bucket, ERROR, [*** LATENT ***,invalidation part of the trace starts here,parameter `x` of add_test5_latent,was invalidated by call to `free()`,use-after-lifetime part of the trace starts here,parameter `x` of add_test5_latent,invalid access occurs here]
codetoanalyze/cpp/pulse/deduplication.cpp, deduplication::SomeTemplatedClass<int*>::lifetime_error_bad, 2, USE_AFTER_DELETE, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `a` of deduplication::SomeTemplatedClass<int*>::lifetime_error_bad,when calling `deduplication::SomeTemplatedClass<int*>::templated_wrapper_delete_ok` here,parameter `a` of deduplication::SomeTemplatedClass<int*>::templated_wrapper_delete_ok,was invalidated by `delete`,use-after-lifetime part of the trace starts here,parameter `a` of deduplication::SomeTemplatedClass<int*>::lifetime_error_bad,when calling `deduplication::SomeTemplatedClass<int*>::templated_wrapper_access_ok` here,parameter `a` of deduplication::SomeTemplatedClass<int*>::templated_wrapper_access_ok,invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_end_next_bad, 3, VECTOR_INVALIDATION, no_bucket, ERROR, [invalidation part of the trace starts here,is pointed to by the `end()` iterator,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::end()` (modelled),return from call to `std::vector::end()` (modelled),invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_end_read_bad, 3, VECTOR_INVALIDATION, no_bucket, ERROR, [invalidation part of the trace starts here,is pointed to by the `end()` iterator,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::end()` (modelled),return from call to `std::vector::end()` (modelled),invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_next_after_emplace_bad, 3, VECTOR_INVALIDATION, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `vec` of iterator_next_after_emplace_bad,was potentially invalidated by `std::vector::emplace()`,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::begin()` (modelled),return from call to `std::vector::begin()` (modelled),invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_next_after_emplace_loop_latent, 2, VECTOR_INVALIDATION, no_bucket, ERROR, [*** LATENT ***,invalidation part of the trace starts here,parameter `vec` of iterator_next_after_emplace_loop_latent,was potentially invalidated by `std::vector::emplace()`,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::begin()` (modelled),return from call to `std::vector::begin()` (modelled),invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_prev_after_emplace_bad, 4, VECTOR_INVALIDATION, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `vec` of iterator_prev_after_emplace_bad,was potentially invalidated by `std::vector::emplace()`,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::begin()` (modelled),return from call to `std::vector::begin()` (modelled),invalid access occurs here]
codetoanalyze/cpp/pulse/vector_iterator.cpp, iterator_read_after_emplace_bad, 3, VECTOR_INVALIDATION, no_bucket, ERROR, [invalidation part of the trace starts here,parameter `vec` of iterator_read_after_emplace_bad,was potentially invalidated by `std::vector::emplace()`,use-after-lifetime part of the trace starts here,variable `iter` declared here,passed as argument to `std::vector::begin()` (modelled),return from call to `std::vector::begin()` (modelled),invalid access occurs here]
codetoanalyze/objc/autoreleasepool/arc_block.m, ArcBlock.callIndexOfObjectPassingTest_linear:, 0, EXPENSIVE_AUTORELEASEPOOL_SIZE, no_bucket, ERROR, [{x->elements.length.ub},Modeled call to indexOfObjectPassingTest:,autorelease,Call to NoArcCallee.giveMeObject,Modeled call to NSObject.autorelease]
codetoanalyze/objc/autoreleasepool/arc_block.m, ArcBlock.callIndexOfObjectPassingTest_param_linear:, 0, EXPENSIVE_AUTORELEASEPOOL_SIZE, no_bucket, ERROR, [{x->elements.length.ub},Modeled call to indexOfObjectPassingTest:,autorelease,Call to NoArcCallee.giveMeObject,Modeled call to NSObject.autorelease]
codetoanalyze/objc/autoreleasepool/arc_caller.m, ArcCaller.callGiveMeObject_linear:, 0, EXPENSIVE_AUTORELEASEPOOL_SIZE, no_bucket, ERROR, [{n},Loop,autorelease,Call to NoArcCallee.giveMeObject,Modeled call to NSObject.autorelease]