WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
254286
usage of initial-exec prevents dlopen of the libwebkit shared object outside of GLIBC on linux
https://bugs.webkit.org/show_bug.cgi?id=254286
Summary
usage of initial-exec prevents dlopen of the libwebkit shared object outside ...
alice
Reported
2023-03-22 14:13:37 PDT
Created
attachment 465547
[details]
a fix for this issue usage of initial-exec prevents valid dlopen of the library later. this works on glibc, because glibc reserves some memory for initial-exec variables in dlopen'd objects. on other libcs, this doesn't work. for instance: $ cat main.c #include <dlfcn.h> #include <stdio.h> int main() { void *h = dlopen("libwebkit2gtk-4.0.so.37", 0); if(!h) { fprintf(stderr, "%s\n", dlerror()); return 1; } return 0; } $ gcc main.c $ ./a.out Error relocating /usr/lib/libwebkit2gtk-4.0.so.37: lroundf: initial-exec TLS resolves to dynamic definition in /usr/lib/libwebkit2gtk-4.0.so.37 $ ldd --version musl libc (x86_64) Version 1.2.3 Dynamic Program Loader Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname utilising initial-exec only when __GLIBC__ is defined fixes this.
Attachments
a fix for this issue
(1.84 KB, patch)
2023-03-22 14:13 PDT
,
alice
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
alice
Comment 1
2023-03-23 13:43:18 PDT
the patch of course has a typo in it- it's #endif not #fi
Michael Catanzaro
Comment 2
2023-09-06 14:45:20 PDT
Closing since TLS_MODEL_INITIAL_EXEC is no longer used anywhere in WebKit. The entire file that you patched was deleted at some point between then and now.
alice
Comment 3
2023-09-06 14:49:03 PDT
looks to have been
https://github.com/WebKit/WebKit/commit/b30a03a4c8a229deacb72a6e4fa46f6469df634f
, seems fine to me. thanks for following up :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug