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(®ex, 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
}
On Ubuntu and Debian, when linking against static libmem built with musl, it crashes on
linux/utils.c
: