Makes library identification when walking the /proc/self/maps file more robust, in particular in the presence of anonymous mappings in the text segment. memquery_library_bounds_by_iterator() deduces the file backing for sequences of contiguous entries even when some entries are anonymous.
Changes get_application_base() to use memquery_library_bounds_by_iterator() to use this functionality as well.
Changes find_executable_vm_areas() to handle an anonymous region with an ELF header.
Changes mmap_check_for_module_overlap() to use a later inode field if the first is 0.
I wanted to have a unit test here but while mocking the maps iterator is feasible, our code here also walks ELF headers, which is harder to separate. Instead I made a new application-based test where the app places anonymous mremaps on top of its own text segment.
Fixes #2566 (closed)