qilingframework / qilingframework/qiling
运行system函数出现崩溃
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 798
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 9
Description
*Describe the bug
当我运行arm架构程序,在程序执行到system函数的时候出现了崩溃,这好像是子进程的问题,有办法解决吗
[x] Syscall ERROR: ql_syscall_clone DEBUG: 'NoneType' object has no attribute 'cur_thread'
Traceback (most recent call last):
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/posix/posix.py", line 374, in load_syscall
retval = syscall_hook(self.ql, *params)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/posix/syscall/sched.py", line 46, in ql_syscall_clone
f_th = ql.os.thread_management.cur_thread
AttributeError: 'NoneType' object has no attribute 'cur_thread'
Traceback (most recent call last):
File "./qilingstart.py", line 79, in <module>
ql.run()
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/core.py", line 595, in run
self.os.run()
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/linux/linux.py", line 184, in run
self.ql.emu_start(self.ql.loader.elf_entry, self.exit_point, self.ql.timeout, self.ql.count)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/core.py", line 775, in emu_start
raise self.internal_exception
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/core_hooks.py", line 127, in wrapper
return callback(*args, **kwargs)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/core_hooks.py", line 170, in _hook_intr_cb
ret = hook.call(ql, intno)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/core_hooks_types.py", line 25, in call
return self.callback(ql, *args)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/linux/linux.py", line 138, in hook_syscall
return self.load_syscall()
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/posix/posix.py", line 392, in load_syscall
raise e
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/posix/posix.py", line 374, in load_syscall
retval = syscall_hook(self.ql, *params)
File "/home/tower/miniconda3/envs/iot/lib/python3.8/site-packages/qiling/os/posix/syscall/sched.py", line 46, in ql_syscall_clone
f_th = ql.os.thread_management.cur_thread
AttributeError: 'NoneType' object has no attribute 'cur_thread'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the ARM program's system call failure, then start in qiling/os/posix/syscall/sched.py at ql_syscall_clone and trace how ql.os.thread_management is initialized during ql.run(). Check the POSIX and Linux run paths mentioned in the traceback. Done means system() no longer raises the NoneType cur_thread error for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100