Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current flags used in `dlopen` to load external modules don't allow modules to define symbols that are already defined by the valkey server binary because the symbol resolution first looks in the server memory and only if it does not find anything, it looks in the module (shared library) memory. This might become a problem if, for instance, we try to implement a new scripting engine based on a newer version of Lua. The Lua interpreter library shares many symbol names with the Lua interpreter included in the Valkey server binary. To fix the above problem, this PR adds the flag `RTLD_DEEPBIND` to the flags used in `dlopen` on systems that support it, which changes the symbol resolution strategy to look for the symbol in the module memory first, if the code executing is from the module. --------- Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
- Loading branch information