-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GOT hook all functions to be interposed #1039
Comments
Turns out that curl does not work when we GOT hook. Because, every shared object has its' own GOT:
|
Allowing all shared objects to be checked for GOT entries enables all data:
Need to determine which objects really should not be examined for GOT entries. |
Discovered an issue where a node app encountered a segfault. It occurs in It appeared initially to be related to lazy loading. After investigation, much shorter version of a long story, it turns out that the use of errno as a global applied with the internal libc update caused a check of errno to appear as though a The current solution is to create an array of errno values and index from the TID. We need to continue to avoid the use of the |
With the internal libc implementation we deliberately made the errno value used by the internal libc not thread specific. We did this to avoid the use of TLS and the %fs register in order to ensure Go apps work without an %fs register context switch. Given this implementation there are 2 errno values to consider; errno and scope_errno. errno is set by the application. It should be scope_errno is used by the internal libc. Use scope_errno only for functions called from the periodic Other functions, primarily those called from interposed functions, can References to scope_errno in the context of an application thread were checking for errors in calls to Going forward we will need to be aware of not referencing scope_errno in the context of an application thread. That may be easy to miss or difficult to avoid at which point we may want to change this approach. |
Updated This represents the short term strategy to not reference scope_errno from an application thread. |
GOT hook all functions that would otherwise by interposed by ld.so. This is an extension what we do during attach.
The text was updated successfully, but these errors were encountered: