Skip to content

Add the --disable-initial-exec-tls configure option. - #1180

Merged
davidtgoldblatt merged 1 commit into
jemalloc:devfrom
davidtgoldblatt:tls
Apr 18, 2018
Merged

davidtgoldblatt merged 1 commit into
jemalloc:devfrom
davidtgoldblatt:tls

Conversation

@davidtgoldblatt

Copy link
Copy Markdown
Contributor

Right now we always make our TLS use the initial-exec model if the compiler
supports it. This change allows configure-time disabling of this setting, which
can be helpful when dynamically loading jemalloc is the only option.

This resolves #937 (or at least, resolves it as much as we're going to in the short term).

@davidtgoldblatt

davidtgoldblatt commented Apr 17, 2018 •

Copy link
Copy Markdown
Contributor Author

To test, I used the following program and verified that the errors went away:

#include <dlfcn.h>
#include <stdio.h>

int main() {
        void *handle = dlopen("lib/libjemalloc.so", RTLD_NOW | RTLD_LOCAL);
        if (!handle) {
                fprintf(stderr,"Couldn't open\n");
                fprintf(stderr, "%s\n", dlerror());
        }
        return 0;
}

@interwq interwq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we always make our TLS use the initial-exec model if the compiler
supports it.  This change allows configure-time disabling of this setting, which
can be helpful when dynamically loading jemalloc is the only option.
@davidtgoldblatt

Copy link
Copy Markdown
Contributor Author

Done.

@davidtgoldblatt
davidtgoldblatt merged commit a62e42b into jemalloc:dev Apr 18, 2018
@davidtgoldblatt
davidtgoldblatt deleted the tls branch April 18, 2018 02:22
@nehaljwani

Copy link
Copy Markdown
Contributor

Will this change be available in the next patch / minor release? How soon is that going to happen? 😅

@davidtgoldblatt

Copy link
Copy Markdown
Contributor Author

Yep -- in fact, the upcoming 5.1 release was the impetus for getting around for this; we expect that it should be out shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

static TLS errors from jemalloc 5.0.0 built on CentOS 6

3 participants