We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When there are two clients with a non-debug build it appears that a static destructor in the first client does not run:
cd dynamorio mkdir twoclients && cd twoclients cat > CMakeLists.txt <<'EOF' cmake_minimum_required(VERSION 3.7) project(twoclients) find_package(DynamoRIO) if (NOT DynamoRIO_FOUND) message(FATAL_ERROR "DynamoRIO package required to build") endif(NOT DynamoRIO_FOUND) add_library(client1 SHARED client1.cpp) configure_DynamoRIO_client(client1) add_library(client2 SHARED client2.cpp) configure_DynamoRIO_client(client2) EOF cat > client1.cpp <<'EOF' #include "dr_api.h" #define CLIENT "client1" class C { public: C() { dr_printf("%s: constructor\n", CLIENT); } ~C() { dr_printf("%s: destructor\n", CLIENT); } }; static C global; DR_EXPORT void dr_client_main(client_id_t id, int argc, const char *argv[]) { dr_set_client_name(CLIENT, ""); dr_set_client_version_string("0.1.0"); dr_printf("%s: running\n", CLIENT); } EOF cat > client2.cpp <<'EOF' #include "dr_api.h" #define CLIENT "client2" class C { public: C() { dr_printf("%s: constructor\n", CLIENT); } ~C() { dr_printf("%s: destructor\n", CLIENT); } }; static C global; DR_EXPORT void dr_client_main(client_id_t id, int argc, const char *argv[]) { dr_set_client_name(CLIENT, ""); dr_set_client_version_string("0.1.0"); dr_printf("%s: running\n", CLIENT); } EOF cd ../../build mkdir build-twoclients && cd build-twoclients cmake -DDynamoRIO_DIR=$PWD/../cmake $PWD/../../dynamorio/twoclients make cd .. bin64/drrun \ -client build-twoclients/libclient1.so 0 '' \ -client build-twoclients/libclient2.so 1 '' -- echo echo
With a debug build I see:
client1: constructor client2: constructor client1: running client2: running echo client2: destructor client1: destructor
But with a non-debug build I see:
client1: constructor client2: constructor client1: running client2: running echo client2: destructor
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When there are two clients with a non-debug build it appears that a static destructor in the first client does not run:
With a debug build I see:
But with a non-debug build I see:
The text was updated successfully, but these errors were encountered: