Skip to content

Commit d7d0fd8

Browse files
committed
Reenable graphviz graph generation.
1 parent d1124b8 commit d7d0fd8

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

src/crashd/dwarf/dwarf_source_code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ def show_tainted_source(zelos, binary_path, trace, taint_path):
310310
address_map = dwarf_data._address_map
311311
address_map._attach_src_to_external_addrs(trace, dwarf_data)
312312

313-
# from .render.graphviz import render_source_graph
314-
# render_source_graph(taint_path, address_map, files)
313+
from crashd.taint.render.graphviz import render_source_graph
314+
315+
render_source_graph(taint_path, address_map, files)
315316

316317
(nodes, edges) = get_nodes_and_edges(taint_path, address_map)
317318
if len(file_to_syspath) > 0:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (C) 2020 Zeropoint Dynamics
2+
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as
5+
# published by the Free Software Foundation, either version 3 of the
6+
# License, or (at your option) any later version.
7+
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU Affero General Public License for more details.
12+
13+
# You should have received a copy of the GNU Affero General Public
14+
# License along with this program. If not, see
15+
# <http://www.gnu.org/licenses/>.
16+
# ======================================================================

src/crashd/taint/taint.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,18 +357,16 @@ def analyze_crash(z, dataflow, inst_address, mem_address):
357357
logger.notice(f"Wrote file: {zcovPath}")
358358
except Exception:
359359
logger.exception("Unable to show source code")
360-
if False:
361-
# This is all debug-graph generation
360+
if True:
361+
# This is all png graph generation
362362
from .render.graphviz import (
363363
render_reduced_path_taint_graph,
364364
render_path_taint_graph,
365-
render_source_graph,
366365
)
367366

368-
# print(taint_path)
369367
render_reduced_path_taint_graph(logger, taint_path)
370368
render_path_taint_graph(logger, taint_path, trace)
371-
render_source_graph(logger, taint_path, trace)
369+
372370
# self.get_ida_taint_overlay(
373371
# z.internal_engine.main_module.EntryPoint,
374372
# trace,

0 commit comments

Comments
 (0)