thehajime / linux

Linux kernel source tree
https://lkl.github.io/
Other
3 stars 1 forks source link

mmap_fixed somehow broken with newer musl #21

Closed thehajime closed 2 days ago

thehajime commented 1 week ago

finally crashed on assert at mallocng(free).

Thread 1 "vmlinux" received signal SIGSEGV, Segmentation fault.
                                                               get_meta (p=p@entry=0x703b47d0 "") at
 src/malloc/mallocng/meta.h:141
141    assert(meta->mem == base);
(gdb) bt
#0  get_meta (p=p@entry=0x703b47d0 "") at src/malloc/mallocng/meta.h:141
#1  0x0000000070724db3 in __libc_free (p=0x703b47d0) at src/malloc/mallocng/free.c:105
#2  0x00000000708a7c61 in ?? ()
#3  0x0000000000000000 in ?? ()
thehajime commented 1 week ago

built with DL_NOMMU_SUPPORT=1 seems to fix this issue.

thehajime commented 1 week ago

mmap_fixed workaround under arch/x86/um doesn't cover all the case of DL_NOMMU_SUPPORT of musl. the commit should be dropped and use proper musl build (or introduce a switch of #13) to fix this issue.

thehajime commented 2 days ago

closing as we're now using NOMMU-built musl libc (with custom alpine-CI)