AttributeError: 'XRef' object has no attribute 'sort'
See original GitHub issuepython3.9 macOS Monterey 12.1 angr 9.1.11752 angr-utils 0.5.0 bingraphvis 0.3.0
import angr
from angrutils import *
def cfgfastpng(filename):
proj = angr.Project(filename, auto_load_libs = False)
cfg = proj.analyses.CFGFast()
plot_cfg(cfg, "cfg", format='png', asminst=True, remove_imports=True)
if __name__ == '__main__':
cfgfastpng('./01_angr_avoid')
WARNING | 2022-03-01 19:55:43,281 | angr.analyses.cfg.cfg_fast | _tidy_data_references() sees an address 0x80d6040 that does not belong to any section or segment.
Traceback (most recent call last):
File “/Users/chenyanzhi/Documents/angr/test.py”, line 12, in <module>
cfgfastpng(‘./01_angr_avoid’)
File “/Users/chenyanzhi/Documents/angr/test.py”, line 8, in cfgfastpng
plot_cfg(cfg, “cfg”, format=‘png’, asminst=True, remove_imports=True)
File “/Users/chenyanzhi/Desktop/angr-dev/angr-utils/angrutils/visualize.py”, line 34, in plot_cfg
vis.process(cfg.graph)
File “/Users/chenyanzhi/Desktop/angr-dev/bingraphvis/bingraphvis/base.py”, line 309, in process
graph = self.pipeline.process(filter=filter)
File “/Users/chenyanzhi/Desktop/angr-dev/bingraphvis/bingraphvis/base.py”, line 286, in process
c.render(n)
File “/Users/chenyanzhi/Desktop/angr-dev/bingraphvis/bingraphvis/base.py”, line 126, in render
an.annotate_content(n, n.content[self.name])
File “/Users/chenyanzhi/Desktop/angr-dev/bingraphvis/bingraphvis/angr/annotator.py”, line 384, in annotate_content
if dr.sort == ‘string’:
AttributeError: ‘XRef’ object has no attribute ‘sort’
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thank you very much, It works, But I found that the second line should be changed to this
because if I change it like you, It will have the following problems
I’ve applied the fix and created a new PyPI version. Thanks for the report!
@mz21g Tried your code to test #32, but it creates the assembly listing for me.