open-obfuscator / o-mvll

:electron: O-MVLL is a LLVM-based obfuscator for native code (Android & iOS)
https://obfuscator.re/omvll
Apache License 2.0
617 stars 66 forks source link

usage of omvll.StringEncOptStack() causes application crash #62

Closed akoreiko closed 3 weeks ago

akoreiko commented 3 weeks ago

Hi, I'm trying the release version 1.1.0 from https://github.com/open-obfuscator/o-mvll/releases/download/1.1.0/omvll_ndk_r26d.tar.gz

Enabling "stack string obfuscation" via omvll.StringEncOptStack() causes application crash. If I use omvll.StringEncOptGlobal() instead, everything works fine.

Romain told me that it might be caused by the latest changes in the code. Could you please take a look at it?

antoniofrighetto commented 3 weeks ago

Please make sure that this conforms with what you're trying to do. As from the documentation, when StringEncOptStack is enabled, the decoded string lives in a stack-allocated buffer. This implies that the lifetime of the buffer is tied to the lifetime of the function where the string is used. We plan to upstream an option which decodes strings on-the-fly and doesn't use neither stack-allocated buffers nor global constructors some time soon.