Newer ld.so mprotects segments spanning a gap as no-access before it maps any contents. This can mean that these segments are no-access in all_memory_areas at the time we process a loaded executable segment, resulting in an assert when we try to compute the md5.
To solve this, we query the OS and not all_memory_areas (which is not updated until after the pcache is loaded). We also limit our md5 to only executable segments, rather than non-writable segments as before, to avoid trying to read the not-yet-mapped and no-access readonly-data segment (previously we were computing on the wrong content in any case before it was mapped).
Issue: #5101 (closed)