This commit is contained in:
Audrey 2022-12-10 14:35:06 -07:00
parent a1b9a9ec0d
commit c3512005e9
1 changed files with 6 additions and 4 deletions

View File

@ -3,9 +3,9 @@ from typing import List, Optional
import networkx
from angr.calling_conventions import SimCC, SimFunctionArgument, SimRegArg, SimStackArg
from angr.sim_type import SimType, parse_signature, SimTypeFunction, SimTypeBottom
from angr.sim_type import parse_signature, SimTypeBottom
from .data import BlockInfo, LiveData, CodeLoc, DataKind
from .data import LiveData, DataKind
from .engine import TypeTapperEngine
class TypeTapperProcedure:
@ -78,7 +78,8 @@ class TypeTapperProcedure:
elif isinstance(loc, SimStackArg):
return self.load(self._translate_stack_offset(loc), loc.size, self._engine.project.arch.memory_endness)
else:
return LiveData.new_null(loc.size)
self._engine.stmt_idx += 1
return LiveData.new_null(self._engine.codeloc, loc.size)
def _write_argloc(self, loc: SimFunctionArgument, value: LiveData):
if isinstance(loc, SimRegArg):
@ -92,7 +93,8 @@ class TypeTapperProcedure:
args = [self._read_argloc(loc) for loc in arg_locs]
result = self.run(args)
if result is None and not isinstance(prototype.returnty, SimTypeBottom):
result = LiveData.new_null(prototype.returnty.size // 8)
self._engine.stmt_idx += 1
result = LiveData.new_null(self._engine.codeloc, prototype.returnty.size // 8)
if result is not None:
self._write_argloc(self.cc.return_val(prototype.returnty), result)
if self._engine.project.arch.call_sp_fix: