[PATCH] D120059: [sanitizer_common] Support Solaris < 11.4 in GetStaticTlsBoundary

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 13:22:45 PST 2022


ro added a comment.

In D120059#3330523 <https://reviews.llvm.org/D120059#3330523>, @MaskRay wrote:

> 



> Oh, thanks. Then perhaps adjust the code to work for Solaris 11.4 and let Illumos/Solaris 11.3 use the `*addr = 0; *size = 0;` fallback? That will have minimum code...

That would effectively mean using D120048 <https://reviews.llvm.org/D120048> amended to use some `SANITIZER_ILLUMOS` to distinguish the two.  Currently, we don't have that unfortunately, as discussed in D119695 <https://reviews.llvm.org/D119695>.  We'd also need to disable the `ld -z relax=transtls` workaround in that patch, but haven't a way to distinguish Solaris and Illumos in `cmake` files either.

I have an idea how to get `__illumos__` defined (using `uname -o` in `llvm/CMakeLists.txt`) to handle the former, but in the end the Illumos community will have to come up with a solution that works for both Solaris and Illumos.

> I hope we can get rid of `main_tls_modid = 1;` and `rt_tlsmodid`...

Fully agreed that's ugly, but at least it works for everyone and has been proven so in GCC.  I'm certainly not vested in it, though, given that I primarily care about Solaris 11.4 where the common code just works.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120059/new/

https://reviews.llvm.org/D120059



More information about the llvm-commits mailing list