zeropointdynamics / zelos

A comprehensive binary emulation and instrumentation platform.
GNU Affero General Public License v3.0
408 stars 50 forks source link

AttributeError: 'EmptyCommentGenerator' object has no attribute 'functions_called' #121

Closed seth1002 closed 4 years ago

seth1002 commented 4 years ago

Describe the bug 18:18:50:engine___:ERROR:Exception while trying to close Zelos Traceback (most recent call last): File "/home/aaaaa/Envs/zelos/lib/python3.7/site-packages/zelos-0.1.1.dev0-py3.7.egg/zelos/engine.py", line 603, in close closure() File "/home/aaaaa/Envs/zelos/lib/python3.7/site-packages/zelos-0.1.1.dev0-py3.7.egg/zelos/ext/plugins/overlay/overlay.py", line 71, in closure f, trace=self.export_trace, mem=self.export_mem File "/home/aaaaa/Envs/zelos/lib/python3.7/site-packages/zelos-0.1.1.dev0-py3.7.egg/zelos/ext/plugins/overlay/overlay.py", line 212, in export for addr in self.zelos.plugins.trace.functions_called.keys(): File "/home/aaaaa/Envs/zelos/lib/python3.7/site-packages/zelos-0.1.1.dev0-py3.7.egg/zelos/ext/plugins/trace.py", line 133, in functions_called return self.comment_generator.functions_called AttributeError: 'EmptyCommentGenerator' object has no attribute 'functions_called'

it happens when i use "--export_trace --inst --fasttrace". sorry, I can't provide relevant test file, can you please check this issue?

rcourt-zp commented 4 years ago

I'll check this out asap

rcourt-zp commented 4 years ago

@seth1002 Could you tell me the architecture of the test file (x86, x86_64, mips, arm) ?

rcourt-zp commented 4 years ago

I believe that I fixed your issue. It should correctly generate an overlay file.

Since you're using the --export_trace flag, you might be trying to use the generated overlay file with IDA. This will still work & highlight executed instructions in yellow, but will NOT add any comments to the executed instructions. I opened a separate issue #122 to address this and will work on getting that in as well.

seth1002 commented 4 years ago

thank you, exception has been fixed, but overlay file still empty.
there is only entry point node info.

DISAS { "comments": [], "entrypoint": 4194912, "functions": [], "sections": [] } ~

rcourt-zp commented 4 years ago

I will take a look. Thanks for the info.

rcourt-zp commented 4 years ago

@seth1002 Is there any binary you can provide that replicates this issue? I can't seem to get an empty overlay file with any our test files.

seth1002 commented 4 years ago

@rcourt Sorry, i pulled wrong version, this bug have been fixed. Thank you!