Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not override symbols in the muslc linker
To avoid deadlocks and infinite recursion, we need to avoid patching symbols inside the linker shared objects. We have been diligently doing this with the GNU linker ("ld-linux") but not for the muslc linker ("ld-musl"). This has been working by chance because we use our recursion guards in many of the symbols we patch, including dlopen. The fact that we override dlopen and we use the guard was preventing a deadlock when using native traces in muslc, as fetching native traces ends adquiring a lock that it's shared by dlopen itself. Now that we do not patch dlopen, there is nothing preventing memray to try to fetch native traces in the inner calls to calloc() and that tries to adquire the dlopen lock which is not re-entrant. The proper fix is to avoid patching inside the muslc linker as we do for Linux. Signed-off-by: Pablo Galindo <[email protected]>
- Loading branch information