FD leak: -satisfy_w_xor_x leaves behind file descriptors
Created by: Carrotman42
In order to support -satisfy_w_xor_x, DynamoRIO utilizes os_create_memory_file to create a memory-backed file. This os_create_memory_file function attempts to allocate such a file via memfd_create (or via /dev/shm) and then calls fd_priv_dup on the returned file descriptor before returning it to the caller. Unfortunately, the function does not subsequently close the original file descriptor, leading to a leak of this duplicated fd:
Inserting a simple close_syscall(fd); before it is overwritten seems to remove this leak.