rdbo / libmem

Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)
GNU Affero General Public License v3.0
748 stars 90 forks source link

Investigate crash on Ubuntu and other glibc Linux distros #191

Closed rdbo closed 1 month ago

rdbo commented 4 months ago

On Ubuntu and Debian, when linking against static libmem built with musl, it crashes on linux/utils.c:

if (LM_GETLINE(&stat_line, &buf_len, stat_file) > 0 && !regexec(&regex, stat_line, LM_ARRLEN(matches), matches, 0)) {
        stat_line[matches[1].rm_eo] = LM_STR('\x00'); /* place null terminator to do 'LM_STRCMP' later */
        // CRASHES IN THE LINE ABOVE!
        // GDB shows wrong values in the `matches` array
}
rdbo commented 1 month ago

This no longer seems to be happening