commit | 5ddc80f28ba352de8fffbfa53001ffd0767ac2cc | [log] [tgz] |
---|---|---|
author | Antonio Maiorano <amaiorano@google.com> | Wed Feb 10 16:27:03 2021 -0500 |
committer | swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com <swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 16 14:56:20 2021 +0000 |
tree | f9f99bf5151d150476830f920d906b43201d1a40 | |
parent | a421556a7cb5554b6f60eb9a18345bb1b7a23ad2 [diff] |
vk-unittest: fix crash when unloading shared lib twice We explicitly call Driver::unload, but so does the dtor. We just needed to clear the dll member after unloading. Bug: b/177624844 Change-Id: If587df197c2e6242892e41e715885a92167730a7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52752 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/VulkanUnitTests/Driver.cpp b/tests/VulkanUnitTests/Driver.cpp index d44a240..a3a5c5b 100644 --- a/tests/VulkanUnitTests/Driver.cpp +++ b/tests/VulkanUnitTests/Driver.cpp
@@ -153,6 +153,8 @@ dlclose(dll); #endif + dll = nullptr; + #define VK_GLOBAL(N, R, ...) N = nullptr #include "VkGlobalFuncs.hpp" #undef VK_GLOBAL