Adds the dual_map_file
to the DR fd_table
. This is to prevent the app from
closing this FD, which manifests as an OOM on an extending commit.
Unfortunately, due to constraints on the order of invocation of
vmm_heap_unit_init
and d_r_os_init
in dynamorio_app_init_part_two_finalize
,
the fd_table
is not initialized when the dual_map_file
is created. This means that
fd_table_add
will not really add it to the fd_table
. So, we remember the
dual_map_file_fd
and add it to fd_table
when we create it.
Modifies the handling for the global log file to use the same mechanism, instead of adding it explicitly in the DEBUG build.
Also adds a -satisfy_w_xor_x
variant for the client.file_io
test which attempts to
close DR FDs. It fails without adding dual_map_file
to fd_table
.
Also adds the same variant for the common.loglevel
test where both, the global
log file and the dual_map_file
, are recorded for later fd_table_add
.
Fixes: #5421 (closed)