flushing [0,-1] results in failing to identify whether code was executed
A vmareas assert hit on Mac (https://github.com/DynamoRIO/dynamorio/issues/1979#issuecomment-586094468) made me think of #4031 (closed). I added a check and it did not match Mac but it did fire on the drcachesim.delay-simple test, here:
#0 binary_search (v=0x7fff33c33c58, start=0x0, end=0x0, area=0x7fff33c02638, index=0x0, first=true) at /home/bruening/dr/git/src/core/vmareas.c:1508
#1 0x00007ffff7d1527a in executable_areas_match_flags (addr_start=0x0,
addr_end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, found_area=0x0, first_match_start=0x0, are_all_matching=false,
match_vm_flags=2048, match_frag_flags=0) at /home/bruening/dr/git/src/core/vmareas.c:3186
#2 0x00007ffff7d155b3 in executable_vm_area_executed_from (start=0x0, end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>)
at /home/bruening/dr/git/src/core/vmareas.c:3303
#3 0x00007ffff7d71658 in dr_unlink_flush_region (start=0x0, size=18446744073709551615) at /home/bruening/dr/git/src/core/lib/instrument.c:7082
#4 0x00007fffb3b911cc in hit_instr_count_threshold () at /home/bruening/dr/git/src/clients/drcachesim/tracer/tracer.cpp:1347
The assert doesn't fire b/c end is NULL. However, this is a bug in executable_areas_match_flags() b/c it doesn't iterate over anything!