Closed Kerilk closed 2 years ago
Hi, the loader doesn't load itself anymore using default build options.
There is a legacy mode that can be enabled at build time with DYNAMIC_LOAD_LOADER
compiler switch in which the loader will still dlopen itself. I did not think this mode was being used and it hasn't been validated for quite some time. Are you using this mode?
No, I am not using this mode and you are correct the loader does not loads itself by default anymore. I reran my test from a clean pull and cmake build just to be sure. The segfault does indeed still happens, but at program termination, that's what left me confused.
So the segfault is occurring for another reason. You may want to investigate, the scenario may seem contrived but I still could see it happen. Maybe one of the C++ symbols that are exported are getting picked up.
I'll be closing this one.
Hello,
The
RTLD_DEEPBIND
flag was removed by https://github.com/oneapi-src/level-zero/commit/f2a5dcc7806b89ac992bef07fb17e1a8ac102612This resurrects issue: https://github.com/oneapi-src/level-zero/issues/39 And the segfault can be easily reproduced.
This will also break any tool that substitute itself to
libze_loader.so
throughLD_PRELOAD
mechanism. IfRTLD_DEEPBIND
is not a viable option for this project, then the loader shouldn't open itself when built as a standalone library.