Skip to content

Commit a87f600

Browse files
committed
Migrate angr deprecated Function::alignment -> is_alignment
1 parent fba8231 commit a87f600

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_cfg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
def is_sane_function(ff):
21-
return not ff.is_syscall and not ff.has_unresolved_calls and not ff.has_unresolved_jumps and not ff.alignment
21+
return not ff.is_syscall and not ff.has_unresolved_calls and not ff.has_unresolved_jumps and not ff.is_alignment
2222

2323

2424
def map_callsites(cfg):
@@ -115,7 +115,7 @@ def test_CADET_00003():
115115
0x804869a,
116116
}
117117

118-
non_syscall_functions = [v for k,v in cfg.functions.items() if not v.is_syscall and not v.alignment]
118+
non_syscall_functions = [v for k,v in cfg.functions.items() if not v.is_syscall and not v.is_alignment]
119119
#check startpoints, I know that sometimes they could be None, but this should not happen in CADET_00003
120120
function_entrypoints = set([f.startpoint.addr for f in non_syscall_functions])
121121
print("additional:", list(map(hex, function_entrypoints-legitimate_functions)))
@@ -201,7 +201,7 @@ def test_0b32aa01_01():
201201
0x8048695
202202
}
203203

204-
non_syscall_functions = [v for k,v in cfg.functions.items() if not v.is_syscall and not v.alignment]
204+
non_syscall_functions = [v for k,v in cfg.functions.items() if not v.is_syscall and not v.is_alignment]
205205
#check startpoints, I know that sometimes they could be None, but this should not happen in CADET_00003
206206
function_entrypoints = set([f.startpoint.addr for f in non_syscall_functions])
207207
print("additional:", list(map(hex,function_entrypoints-legitimate_functions)))
@@ -368,7 +368,7 @@ def test_fullcfg_properties():
368368

369369
# check that we do not encounter any unexpected jumpout
370370
if not ff.is_syscall and ff.returning and not ff.has_unresolved_calls and \
371-
not ff.has_unresolved_jumps and ff.startpoint is not None and not ff.alignment and ff.endpoints:
371+
not ff.has_unresolved_jumps and ff.startpoint is not None and not ff.is_alignment and ff.endpoints:
372372
if not cfg_utils.is_floatingpoint_function(backend,ff):
373373
if len(ff.jumpout_sites) > 0:
374374
unexpected_jumpout = [(binary,int(jo.addr)) for jo in ff.jumpout_sites \

0 commit comments

Comments
 (0)