Obtain other-bitwidth libdynamorio from the configuration
Driven by https://github.com/DynamoRIO/dynamorio/pull/5172#issuecomment-991684246
This is a feature request to obtain the path used for the other-bitwidth libdynamorio for cross-arch execve from the configuration, instead of editing the current self path using build-time path assumptions.
Today cross-arch execve (a 32-bit process launching a 64-bit binary, or vice versa) uses dynamorio_alt_arch_path
, which is set up in get_dynamo_library_bounds()
at init time using the "lib32" and "lib64" paths set in the build system (INSTALL_LIB_{X86,X64}
) to edit the path of the current self library. That hardcoded path edit causes problems with package installs.
The proposal here is to obtain the other-bitwidth path from the configuration: the same place we get the options and log directory.
We would add something like DYNAMORIO_VAR_AUTOINJECT{32,64}
, have drrun set both for every app just like it sets DYNAMORIO_VAR_RUNUNDER
and other parameters, and add both to env_to_propagate
for execve so that child processes inherit the configuration in environment variables (overridden by config files of course). The existing config file defaults could be used for systemwide or package installs to set the value.