google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.03k stars 997 forks source link

ASAN aborts on UML x86_64 #1229

Open JoeyJiao opened 4 years ago

JoeyJiao commented 4 years ago

I see the failure on 4.19 and lastest kernel 5.7-rc2 https://github.com/torvalds/linux/commit/ae83d0b416db002fe95601e7f97f64b59514d936

I looks similar to https://github.com/google/sanitizers/issues/960 https://github.com/google/sanitizers/issues/837 and https://github.com/google/sanitizers/issues/856

Steps to reproduce. make -j32 defconfig ARCH=um SUBARCH=x86_64 x86_64_defconfig make -j32 linux ARCH=um SUBARCH=x86_64 ./linux mem=4096M ubda=rootfs-stretch screen /dev/pts/7 clang -fsanitize=address test.c ./a.out

Tried to -fno-pie too, but the same.

uname -a

Linux qr001 5.7.0-rc2 #1 Mon Apr 20 09:01:45 CST 2020 x86_64 GNU/Linux

Error: ==151==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. ==151==ASan shadow was supposed to be located in the [0x00007fff7000-0x10007fff7fff] range. ==151==This might be related to ELF_ET_DYN_BASE change in Linux 4.12. ==151==See https://github.com/google/sanitizers/issues/856 for possible workarounds. ==151==Process memory map follows: 0x000000100000-0x000000102000 0x000000400000-0x000000528000 /root/a.out 0x000000728000-0x000000729000 /root/a.out 0x000000729000-0x00000072c000 /root/a.out 0x00000072c000-0x000000fd2000 [heap] 0x000040000000-0x000040023000 /lib/x86_64-linux-gnu/ld-2.24.so 0x000040023000-0x000040028000 0x000040028000-0x000040043000 0x000040223000-0x000040224000 /lib/x86_64-linux-gnu/ld-2.24.so 0x000040224000-0x000040225000 /lib/x86_64-linux-gnu/ld-2.24.so 0x000040225000-0x000040226000 0x000040226000-0x00004023e000 /lib/x86_64-linux-gnu/libpthread-2.24.so 0x00004023e000-0x00004043d000 /lib/x86_64-linux-gnu/libpthread-2.24.so 0x00004043d000-0x00004043e000 /lib/x86_64-linux-gnu/libpthread-2.24.so 0x00004043e000-0x00004043f000 /lib/x86_64-linux-gnu/libpthread-2.24.so 0x00004043f000-0x000040443000 0x000040443000-0x00004044a000 /lib/x86_64-linux-gnu/librt-2.24.so 0x00004044a000-0x000040649000 /lib/x86_64-linux-gnu/librt-2.24.so 0x000040649000-0x00004064a000 /lib/x86_64-linux-gnu/librt-2.24.so 0x00004064a000-0x00004064b000 /lib/x86_64-linux-gnu/librt-2.24.so 0x00004064b000-0x00004074e000 /lib/x86_64-linux-gnu/libm-2.24.so 0x00004074e000-0x00004094d000 /lib/x86_64-linux-gnu/libm-2.24.so 0x00004094d000-0x00004094e000 /lib/x86_64-linux-gnu/libm-2.24.so 0x00004094e000-0x00004094f000 /lib/x86_64-linux-gnu/libm-2.24.so 0x00004094f000-0x000040952000 /lib/x86_64-linux-gnu/libdl-2.24.so 0x000040952000-0x000040b51000 /lib/x86_64-linux-gnu/libdl-2.24.so 0x000040b51000-0x000040b52000 /lib/x86_64-linux-gnu/libdl-2.24.so 0x000040b52000-0x000040b53000 /lib/x86_64-linux-gnu/libdl-2.24.so 0x000040b53000-0x000040b69000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x000040b69000-0x000040d68000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x000040d68000-0x000040d69000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x000040d69000-0x000040d6a000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x000040d6a000-0x000040eff000 /lib/x86_64-linux-gnu/libc-2.24.so 0x000040eff000-0x0000410ff000 /lib/x86_64-linux-gnu/libc-2.24.so 0x0000410ff000-0x000041103000 /lib/x86_64-linux-gnu/libc-2.24.so 0x000041103000-0x000041105000 /lib/x86_64-linux-gnu/libc-2.24.so 0x000041105000-0x00004145b000 0x007fbfcb5000-0x007fbfcd6000 [stack] 0x007fbffff000-0x007fc0000000 [vdso] ==151==End of process memory map.

Any idea or suggestion?

benzea commented 1 month ago

https://patchwork.ozlabs.org/project/linux-um/list/?series=408453