LSPosed/core
JingMatrix e75b6007b4
Make module base address parsing robust (#376)
Resolves a `SIGSEGV` crash that occurs when co-instrumenting with recent versions of Frida.

The root cause was that the previous parsing logic would select the first memory mapping matching the library name. When Frida is active, it can temporarily create a transient, read-only mapping at a lower address than the real library. This would cause our parser to select the wrong base address.

This commit refactors the `findModuleBase` function to be structurally aware. It now filters all mappings for the target library and specifically searches for the pattern of a read-only (`r--p`) segment immediately followed by an executable (`r-xp`) segment. This allows it to correctly identify the real library mapping and ignore transient artifacts from other instrumentation frameworks.
2025-08-01 20:40:43 +02:00
..
src/main Make module base address parsing robust (#376) 2025-08-01 20:40:43 +02:00
.gitignore Stablize CMake arguments (#2266) 2022-12-03 06:41:54 +00:00
build.gradle.kts Add commons-lang as a subproject 2024-09-22 14:25:45 +02:00
proguard-rules.pro Fix proguard rules 2024-08-31 02:43:25 +02:00