Author :
Behdad Esfahbod
Date :
2025-06-03 07:56:13
Hash :43ec023e Message :* src/autofit/ft-hb.c: Fix usage of `RTLD_DEFAULT`.
Using `RTLD_DEFAULT` we see whether the process already has HarfBuzz linked
in, and reuse it. If this symbol is not defined it is tempting to use
`RTLD_GLOBAL` instead, which would make the library available to the whole
process. However, without `RTLD_DEFAULT`, we would risk loading a second
HarfBuzz library, and if the linker mixes them up, probably giving symbols
from the new library to other clients, we might get into trouble. For this
reason, we do not pass `RTLD_GLOBAL` to `dlopen`; the default is
`RTLD_LOCAL`, and the rest of the process won't see the loaded HarfBuzz and
hopefully all be happy.