Disable TLS (and have it panic)

I would like a function to disable TLS completely, at runtime. TLS atexit hook should be lazily installed for this to work. Disabling TLS should stop that hook from being installed.

This may help me track down an issue I’m having.

See also https://github.com/rust-lang/rust/issues/52138

Have you tried to get a backtrace, as requested in that issue? That should be an easier way to get closer to the root cause, rather than trying weird things like disabling TLS.

1 Like

I don’t remember where I posted the backtrace. But this would still be useful for libloading?

According to your issue, you’re not even using libloading – but you had several people ask you for the backtrace so they could see if it was the same issue that libloading users run into. If you shared that with them separately (like on IRC), it would still be useful to put in the issue.

If nothing else, it helps other people who may encounter a similar problem to know whether it’s really the same as yours. And hopefully when you have a solution, others can know if that might also help them.

1 Like

If I recall correctly, and that’s a big if, it was something about dlsym() and free(), not TLS. But that’s not to say TLS is unrelated.

I want to test every single idea ppl have come up with: TLS, etc. (in fact TLS is the only thing ppl are thinking of at the moment, so I want to test it first.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.