wmkhoo / taintgrind

A taint-tracking plugin for the Valgrind memory checking tool
GNU General Public License v2.0
247 stars 42 forks source link

Reducing the taint graph #29

Closed yasaminmahmoodi closed 5 years ago

yasaminmahmoodi commented 5 years ago

Hello,

I use taintgrind for SystemC project. It taints all the SystemC library modules which are used in the project. Therefore, the Graphviz file will be a big one, so that it is difficult to visualize. I would like to know if it is possible to only show the output of my modules in the graph.

Thank you for your help!

wmkhoo commented 5 years ago

I'm not familiar with any tools that work with dot files. You could try manually reducing the graph yourself using any text editor, i.e. remove all the subgraphs you're not interested in.

yasaminmahmoodi commented 5 years ago

ok, Thank you for your help.

yasaminmahmoodi commented 3 years ago

Hi again,

Thank you for adding head=yes option to limit propagation of tainted data. It is a great option! It would be also great if there was an option to print output of taintgrind based on the Address/Location part. In this way we could limit the printed output based on some certain modules. Or if it was possible to skip printing some outputs based on Address/Location.

Thanks

wmkhoo commented 3 years ago

One option is to use grep to filter the desired output, e.g.

$ <taintgrind command> 2>&1 | grep -E "module1|module2"

The above command will print only lines containing the string "module1" or "module2". Another option is to modify the log2dot.py Python script.