Skip to content

Commit 9be9a7b

Browse files
committed
Adapt to upstream CBMC changes
- MALLOC -> ALLOCATE - java_new_array -> java_new_array_data
1 parent 910b88d commit 9be9a7b

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

cbmc/src/pointer-analysis/value_set.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ void value_sett::get_value_set_rec(
734734
}
735735
else if(statement==ID_cpp_new ||
736736
statement==ID_cpp_new_array ||
737-
statement==ID_java_new_array )
737+
statement==ID_java_new_array_data)
738738
{
739739
assert(suffix=="");
740740
assert(expr_type.id()==ID_pointer);

src/pointer-analysis/local_value_set.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void local_value_sett::get_value_set_rec(
161161
else if(expr.id()==ID_side_effect)
162162
{
163163
const irep_idt &statement=expr.get(ID_statement);
164-
if(statement==ID_malloc)
164+
if(statement==ID_allocate)
165165
{
166166
// Override how malloc finds its type:
167167
exprt malloc_copy=expr;
@@ -235,7 +235,7 @@ void local_value_sett::apply_side_effects(
235235
const namespacet &ns)
236236
{
237237
if(rhs.id()==ID_side_effect &&
238-
rhs.get(ID_statement)==ID_malloc)
238+
rhs.get(ID_statement)==ID_allocate)
239239
{
240240
const typet &dynamic_type=
241241
static_cast<const typet &>(rhs.find(ID_C_cxx_alloc_type));

src/taint-analysis/taint_statistics.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static bool is_instruction_StringBuilder_call(
114114
if(asgn.rhs().id()==ID_side_effect)
115115
{
116116
side_effect_exprt const see = to_side_effect_expr(asgn.rhs());
117-
if(see.get_statement() == ID_malloc &&
117+
if(see.get_statement() == ID_allocate &&
118118
does_irep_contains_ident(see.type(), "java::java.lang.StringBuilder"))
119119
return true;
120120
}
@@ -671,5 +671,3 @@ taint_statisticst::get_duration_of_all_phases_together() const
671671
;
672672
return sum < 0.0001 ? 0.0001 : sum;
673673
}
674-
675-

src/taint-slicer/instrumenter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ void taint_instrumentert::instrument_instructions_with_shadow_variables(
626626
props);
627627
}
628628
else if(asgn.rhs().id()==ID_side_effect &&
629-
to_side_effect_expr(asgn.rhs()).get_statement()==ID_malloc)
629+
to_side_effect_expr(asgn.rhs()).get_statement()==ID_allocate)
630630
{
631631
// TODO: Currently we handle here only allocations of single
632632
// instances. Extension to array allocations will come later.

0 commit comments

Comments
 (0)