Skip to content

Improved memory usage or memory usage estimation #743

Open
@Dobatymo

Description

@Dobatymo

Hi, this more a feature request than a bug report.

I was analyzing a 23.0 MB windows executable (with --large-file, which seems undocumented using --help btw) and after 12-24 hours it failed with a MemoryError. My machine has 48GB of ram (with probably 40GB available for floss).

So my questions are:

  • given the file size and maybe some quick analysis of the file, could there be a estimate of how much memory is required for a full analysis? So you don't have to spend a day waiting only to see it fail if you know there's not enough memory in the first place.
  • if I would like to improve memory usage, where would I start looking in the code? I am well versed in python (but not in reverse engineering) and I would like to help
INFO: floss: extracting static strings...
WARNING: floss: a large file was provided with a size of 24158888 bytes, this may take much more time and system resource to process
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
WARNING: viv_utils: cfg: incomplete control flow graph
finding decoding function features: 100%|█████| 355/355 [1:32:21<00:00, 15.61s/ functions, skipped 0 library functions]
INFO: floss.stackstrings: extracting stackstrings from 351 functions
extracting stackstrings:  32%|█████████████▌                             | 111/351 [2:16:34<4:55:16, 73.82s/ functions]
Traceback (most recent call last):
  File "main.py", line 688, in <module>
  File "main.py", line 626, in main
  File "stackstrings.py", line 172, in extract_stackstrings
  File "utils.py", line 414, in get_referenced_strings
  File "funcy\objects.py", line 28, in __get__
  File "viv_utils\__init__.py", line 197, in instructions
MemoryError
[3548] Failed to execute script 'main' due to unhandled exception!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions