-
Notifications
You must be signed in to change notification settings - Fork 539
Description
Describe the bug
Dynamically loading libcef.so into a running process on Linux arm64 fails since CEF 129 with the error message "cannot allocate memory in static TLS block". Since a lot of CEF wrappers depend on the ability to dynamically extract and load libcef.so (known: CEF4Delphi, JCEF, probably more), this issue effectively makes CEF 129+ unusable for these wrappers on Linux arm64.
To Reproduce
Either use CEF 129 with for example JCEF on Linux, or use the following synthetic console application to dlopen libcef.so:
#include <stdio.h>
#include <dlfcn.h>
int main (void)
{
void* g_libcef_handle = dlopen("./libcef.so", RTLD_LAZY | RTLD_LOCAL);
if (!g_libcef_handle) {
fprintf(stderr, "dlerror %s\n", dlerror());
}
return 0;
}Compile the source code :
g++ -o main.cpp -ldlRun :
bash-4.4$ ./a.out
dlerror ./libcef.so: cannot allocate memory in static TLS block
bash-4.4$ Expected behavior
libcef.so can be dynamically loaded into a Linux process.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS: Linux (all ARM popular distributions)
- CEF Version: 129.x (6668)
Background/Analysis
The TLS segment size of Chromium 129 increases by over 700 bytes, as can be seen here:
bash-4.4$ readelf -Wl libcef.so | grep -E 'PhysAddr|TLS'
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
TLS 0xc7cc340 0x000000000c7ec340 0x000000000c7ec340 0x000090 0x000430 R 0x40
bash-4.4$ This issue is similar to #3616.