Skip to content

Commit

Permalink
Remove deprecated code related to longjmp
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheitman committed Jul 11, 2023
1 parent 0bde106 commit 85454cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions engines/pastis-triton/pastisdse/pastisdse.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,6 @@ def _process_seed_received(self, typ: SeedType, seed: Seed):
logging.error(f"seed injection {self._seedloc.name} but can't find 'input_file' on program argv")
return

# set the longjmp addr if defined
if hasattr(self.program, "longjmp_addr"):
os.environ["TT_LONGJMP_ADDR"] = str(self.program.longjmp_addr)
try:
# Run the seed and determine whether it improves our current coverage.
t0 = time.time()
Expand Down
15 changes: 0 additions & 15 deletions pastisbenchmark/replayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,10 @@ def __init__(self, program: Path, workspace: Path, type: ReplayType, injloc: See
# initiatialize directories
self._init_directories()

# set longjmp ENV var if applicable
self._set_longjump_plt()

def _init_directories(self):
if not self.corpus_replay_dir.exists():
self.corpus_replay_dir.mkdir()

def _set_longjump_plt(self):
try:
proc = subprocess.Popen(['objdump', '-D', self.program.absolute()], stdout=subprocess.PIPE)
out, err = proc.communicate()
for line in out.split(b"\n"):
if b"<longjmp@plt>:" in line:
addr = line.split()[0]
logging.info(f"lonjmp address found at: {addr}")
os.environ["TT_LONGJMP_ADDR"] = str(int(addr, 16))
except:
return 0

@property
def corpus_replay_dir(self) -> Path:
if self.type == ReplayType.qbdi:
Expand Down

0 comments on commit 85454cb

Please sign in to comment.