We are seeing a strange memory leak report when running a binary compiled with Clang's address sanitizer linked with USD v23.11. That is, our code is compiled with address sanitizer enabled, while USD is compiled in release mode using its own script and gcc 11. The error from ASAN is:
From that I gather that the Tf_RegistryManagerImpl's _registrationFunctions member is not freed, which is strange, because the singleton instance itself is freed. The leak is always reproducible and doesn't require calling any USD functions beyond the DSO's initialisation.
Steps to Reproduce
Run any binary compiled with Clang and address sanitizer, linked with USD v23.11 on Rocky 8.
System Information (OS, Hardware)
Rocky Linux 8
Package Versions
USD: v23.11
Compiler used for USD: gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
Compiler used for our code: clang version 14.0.6
Description of Issue
We are seeing a strange memory leak report when running a binary compiled with Clang's address sanitizer linked with USD v23.11. That is, our code is compiled with address sanitizer enabled, while USD is compiled in release mode using its own script and gcc 11. The error from ASAN is:
From that I gather that the Tf_RegistryManagerImpl's _registrationFunctions member is not freed, which is strange, because the singleton instance itself is freed. The leak is always reproducible and doesn't require calling any USD functions beyond the DSO's initialisation.
Steps to Reproduce
System Information (OS, Hardware)
Rocky Linux 8
Package Versions
USD: v23.11 Compiler used for USD: gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) Compiler used for our code: clang version 14.0.6
Build Flags
build_usd.py --build-variant=release --materialx --no-prman --no-tutorials --no-examples --no-docs --no-tools --no-python --use-cxx11-abi=1
Edit: fixed formatting