`IndexError` at `store_tmp` of `scratch.py` state plugin
See original GitHub issueDescribe the bug.
IndexError
on tmp
at
https://github.com/angr/angr/blob/ffb377e59abd8b9e296eff9f456fd9fb84820958/angr/state_plugins/scratch.py#L120
To Reproduce. Only callstack…
File "***", line ***, in ***
cfg = self._proj.analyses.CFGEmulated(context_sensitivity_level=2,
File "/home/angr/angr-dev/angr/angr/analyses/analysis.py", line 115, in __call__
oself.__init__(*args, **kwargs)
File "/home/angr/angr-dev/angr/angr/analyses/cfg/cfg_emulated.py", line 306, in __init__
self._analyze()
File "/home/angr/angr-dev/angr/angr/analyses/forward_analysis/forward_analysis.py", line 216, in _analyze
self._analysis_core_baremetal()
File "/home/angr/angr-dev/angr/angr/analyses/forward_analysis/forward_analysis.py", line 353, in _analysis_core_baremetal
self._pre_job_handling(job_info.job)
File "/home/angr/angr-dev/angr/angr/analyses/cfg/cfg_emulated.py", line 1135, in _pre_job_handling
sim_successors, exception_info, _ = self._get_simsuccessors(addr, job, current_function_addr=job.func_addr)
File "/home/angr/angr-dev/angr/angr/analyses/cfg/cfg_emulated.py", line 2859, in _get_simsuccessors
sim_successors = self.project.factory.successors(
File "/home/angr/angr-dev/angr/angr/factory.py", line 60, in successors
return self.default_engine.process(*args, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/slicing.py", line 19, in process
return super().process(*args, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/engine.py", line 149, in process
self.process_successors(self.successors, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/failure.py", line 21, in process_successors
return super().process_successors(successors, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/syscall.py", line 18, in process_successors
return super().process_successors(successors, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/hook.py", line 54, in process_successors
return super().process_successors(successors, procedure=procedure, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/unicorn.py", line 169, in process_successors
return super().process_successors(successors, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/soot/engine.py", line 64, in process_successors
return super().process_successors(successors, **kwargs)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/heavy.py", line 136, in process_successors
self.handle_vex_block(irsb)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/super_fastpath.py", line 19, in handle_vex_block
super().handle_vex_block(irsb)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/slicing.py", line 26, in handle_vex_block
super().handle_vex_block(irsb)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/actions.py", line 30, in handle_vex_block
super().handle_vex_block(irsb)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/inspect.py", line 45, in handle_vex_block
super().handle_vex_block(irsb)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/light.py", line 446, in handle_vex_block
self._handle_vex_stmt(stmt)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/slicing.py", line 30, in _handle_vex_stmt
super()._handle_vex_stmt(stmt)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/inspect.py", line 40, in _handle_vex_stmt
super()._handle_vex_stmt(stmt)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/resilience.py", line 36, in inner
return getattr(super(VEXResilienceMixin, self), func)(*iargs, **ikwargs)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/heavy.py", line 202, in _handle_vex_stmt
super()._handle_vex_stmt(stmt)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/light.py", line 51, in _handle_vex_stmt
handler(stmt)
File "/home/angr/angr-dev/angr/angr/engines/vex/light/light.py", line 186, in _handle_vex_stmt_WrTmp
self._perform_vex_stmt_WrTmp(
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/actions.py", line 141, in _perform_vex_stmt_WrTmp
super()._perform_vex_stmt_WrTmp(tmp, data, deps=data_deps)
File "/home/angr/angr-dev/angr/angr/engines/vex/heavy/heavy.py", line 38, in _perform_vex_stmt_WrTmp
self.state.scratch.store_tmp(tmp, data, deps=deps)
File "/home/angr/angr-dev/angr/angr/state_plugins/scratch.py", line 120, in store_tmp
self.temps[tmp] = content
IndexError: list assignment index out of range
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Time Tracking Report - Sonatype JIRA
IOException" from com.sonatype.nexus.ssl.plugin.internal.ui. ... Race condition in repository status change can leave repository stuck in initialized state.
Read more >Full text of "Microcomputing Magazine (June 1982)"
Full text of "Microcomputing Magazine (June 1982)". See other formats. June 1982 MICROCOMPUTING T.M. A WAYNE GREEN PUBUCATION USA $2.95 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In some sense this behavior is “normal”, but there is also a specific fix for it: you should build your own engine (similar to the UberEngine declaration) but also include the TLSMixin, which will give thread-local storage to all execution-instance variables.
The catch is that this has never really been tested, so it might not work! But I’m pretty sure it should! Let me know if you have any problems!
This issue has been closed due to inactivity.