[all-commits] [llvm/llvm-project] 8909a2: [libc++] Encode additional ODR-affecting propertie...

Brad Smith via All-commits all-commits at lists.llvm.org
Mon Oct 30 02:20:58 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 8909a24d0af1892ec1f5b7d78d844e639a3c9400
      https://github.com/llvm/llvm-project/commit/8909a24d0af1892ec1f5b7d78d844e639a3c9400
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
    M libcxx/include/__config
    A libcxx/test/libcxx/odr_signature.exceptions.sh.cpp
    A libcxx/test/libcxx/odr_signature.hardening.sh.cpp

  Log Message:
  -----------
  [libc++] Encode additional ODR-affecting properties in the ABI tag (#69669)

As explained in `__config`, we have an ABI tag that we use to ensure
that we don't run into ODR issues when mixing different versions of
libc++ in multiple TUs. However, the reasoning behind that extends not
only to different versions of libc++, but also to different
configurations of the same version of libc++. In fact, we've been aware
of this for a while but never really bothered to make the change because
ODR issues are often thought to be benign.

Well, it turns out that I just spent over an hour banging my head
against an issue that boils down to our lack of encoding of some ODR
properties in the ABI tag, so here's the patch we should have done a
long time ago.

For now, the ODR properties we encode in the ABI tag are:
- library version
- exceptions vs no-exceptions
- hardening mode

Those are all things that we support different values for on a per-TU
basis and they definitely affect ODR in a meaningful way. We can add
more properties later as we see fit.

(cherry picked from commit bc792a284362696c91599f9ab01f74eda4b9108f)


  Commit: 2b82ec7947fe070c16091a7724b2865d49e3c299
      https://github.com/llvm/llvm-project/commit/2b82ec7947fe070c16091a7724b2865d49e3c299
  Author: Brad Smith <brad at comstyle.com>
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
    M openmp/runtime/src/kmp_wrapper_getpid.h

  Log Message:
  -----------
  [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553)

Use the getthrid() function instead of a syscall.

(cherry picked from commit 7e31b45d6a2571ff17426930dcbb784473a965b4)


Compare: https://github.com/llvm/llvm-project/compare/e9dcc15f514a...2b82ec7947fe


More information about the All-commits mailing list