I am trying to leverage the address sanitizer from GCC 8.3.0 in a 32 bit debian buster docker container, but keep hitting my head against a wall when launching the executable:
==17738==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==17738==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff] range.
==17738==Process memory map follows:
0x29414000-0x295f3000
...
0x5762d000-0x57a9c000
0xfff26000-0xfff47000 [stack]
==17738==End of process memory map.
As you might be able to see, there does not seem to be an overlap. And the kernel version 5.11.0-41-generic does not seem to have the issues other people reported with similar symptoms.
The same binary works flawlessly on the 64 bit host Ubuntu system, but the 32 bit debian buster docker container (AND a 64 bit debian docker image) always gives the above error. The sanitizer is compiled with -fsanitize=address and linked with -static-libasan in the debian docker container.
Other people have indicated launching docker with --privileged --cap-add=SYS_PTRACE should help, but it does not seem to alleviate the problem.