mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
When building Impala with shared libraries, we currently link against the static library of GTest in both libkudu_test_util.so and unifiedbetests. libkudu_test_util.so is also linked by unifiedbetests dynamically. When unifiedbetests exits, both binaries try to delete the global variables of GTest, which leads to a double-free memory issue. To fix the double-free memory issue, instead of statically linking libgtest.a, all binaries should dynamically link libgtest.so. So when the process exits, only libgtest.so will delete its global variables. Tests - Verified the issue resolved locally Change-Id: I27d21217db219f52b072a4e5cfa1caaace35d1a2 Reviewed-on: http://gerrit.cloudera.org:8080/21163 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2.8 KiB
2.8 KiB