ev-flow / ev-flow/quark-engine

Memory bursts occurred on Radiocontrast API

Open
#365 0 comments 0 reactions 0 assignees View on GitHub
issue-processing-state-01
Dominant language
Python
Stars
1.7k
Forks
218
Avg merge
4d 12h
Merged PRs (30d)
7

Description

**Describe the bug**

Memory bursts may occur when using the Radiocontrast API.

For example, when taking [this Dex](https://github.com/quark-engine/quark-engine/files/9027918/flubot_payload.zip) as input and generating rules from the method `Lcom/iqiyi/i18n/p4c4a83bb;->onAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)V`, Quark v22.6.1 requires more than **64 GB of memory** to finish.

However, compared to the size of the sample (2.1 MB), such high memory requirements may decrease the usability of the API. Thus, we may need more improvement on its memory usage.

**Screenshot**

![](https://i.imgur.com/8gfqbdh.png)

**To Reproduce**

Start the rule generation by running the following script.

```python
#!/usr/bin/python3
from quark.radiocontrast import RadioContrast

APK_PATH = "/flubot_payload.dex"
TARGET_METHOD = "Lcom/iqiyi/i18n/p4c4a83bb;->onAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)V"
GENERATED_RULE_DIR = "./Generated"

radiocontrast = RadioContrast(
APK_PATH,
TARGET_METHOD,
GENERATED_RULE_DIR
)
radiocontrast.rule_generate()
```

**Environment**

+ Ubuntu 18.04
+ Python 3.8.10
+ Quark-Engine v22.6.1

**Possible related issues**

+ #299
+ #130

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.