object_pool: drop over-alignment of TLS LocalPoolDescriptor (UBSan) #545
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| # Skip when every changed file is markdown (README / docs / etc.). The | |
| # workflow still fires if a PR touches even one non-markdown file in | |
| # addition to docs. The markdown-link-check workflow keeps running on | |
| # all changes -- documentation correctness still gets verified. | |
| push: | |
| branches: [master] | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: | |
| - '**/*.md' | |
| jobs: | |
| # Oldest supported compiler (gcc 11, first libstdc++ with std::atomic | |
| # wait/notify per P1135 -- required since #158 replaced the Linux-only | |
| # futex path in fiber/detail/scheduling_group.cc). Pinned to ubuntu-22.04 | |
| # because GitHub's ubuntu-20.04 runners are deprecated and the queue can | |
| # stall for tens of minutes; gcc-11 is the distro default for 22.04. | |
| build_on_ubuntu_22_04: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| cc: [11] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Dump environment | |
| run: | | |
| uname -a | |
| gcc -v | |
| export | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-${{ matrix.cc }} g++-${{ matrix.cc }} ninja-build ccache | |
| # Apt installs only the versioned binaries; /usr/bin/gcc still points | |
| # at the distro default (gcc-11 on 22.04, gcc-13 on 24.04). Register | |
| # the matrix version with update-alternatives so plain `gcc`/`g++` | |
| # actually resolve to it -- otherwise blade's shutil.which('gcc') | |
| # and ccache's compiler dispatch both pick up the wrong version. | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.cc }} 100 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.cc }} 100 | |
| # /usr/lib/ccache holds symlinks (gcc, g++, gcc-10, ...) -> ccache. | |
| # Prepending to PATH makes blade's shutil.which('gcc') resolve to the | |
| # ccache shim; ccache then dispatches to the real compiler via its | |
| # own PATH inspection. Blade reads no env var here. | |
| echo "/usr/lib/ccache" >> $GITHUB_PATH | |
| # build64_release cache covers thirdparty/foreign_cc artifacts (curl/openssl/ | |
| # jemalloc/nghttp2 etc.); those are autotools/cmake subbuilds, not plain | |
| # cc_libraries, so ccache can't help with them. The .o files inside | |
| # build64_release/ rarely survive an incremental run because actions/checkout | |
| # resets source mtimes -- that's precisely what ccache (content-hash based) | |
| # solves for the regular cc_library/cc_test compilations. | |
| - name: Cache blade build dir | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build64_release | |
| key: blade-${{ runner.os }}-${{ matrix.cc }}-${{ hashFiles('thirdparty/**/*.tar.gz', 'thirdparty/**/*.zip', 'thirdparty/**/BUILD', 'thirdparty/**/*.patch') }} | |
| restore-keys: | | |
| blade-${{ runner.os }}-${{ matrix.cc }}- | |
| - name: Cache ccache db | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-${{ runner.os }}-${{ matrix.cc }}-${{ github.sha }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ matrix.cc }}- | |
| - name: ccache stats (before) | |
| run: ccache --zero-stats && ccache --show-config | |
| - name: Pin vcpkg to the baseline | |
| # CI runners ship a stale vcpkg clone whose ports / version DB predate the | |
| # baseline pinned in BLADE_ROOT's vcpkg_config. Fetch that commit and check | |
| # it out so versions/*.json and ports/ are consistent with the baseline -- | |
| # otherwise vcpkg resolves a baseline version (e.g. openssl 3.6.3) that the | |
| # stale working-tree version DB has no entry for. (The vcpkg tool binary is | |
| # untracked, so checkout leaves it in place.) | |
| shell: bash | |
| run: | | |
| VCPKG_DIR="${VCPKG_INSTALLATION_ROOT:-/usr/local/share/vcpkg}" | |
| git -C "$VCPKG_DIR" fetch --depth 1 origin 06a7fdd564234908731c59ac46a624f808e87b1c | |
| git -C "$VCPKG_DIR" checkout -f 06a7fdd564234908731c59ac46a624f808e87b1c | |
| - name: Build | |
| run: ./blade build ... -k | |
| - name: ccache stats (after) | |
| run: ccache --show-stats | |
| - name: Run tests | |
| # BLADE_ROOT sets test_timeout=60 -- the slowest legit test runs in | |
| # ~40s on M2 release/-O2. GHA runners are slower and contended, so | |
| # scale up here. 5x = 300s effective; still tight enough that a real | |
| # hang (10+ min) is caught fast. | |
| run: ./blade test --test-timeout-multiplier=5 ... | |
| # Latest compiler (gcc 13). | |
| build_on_ubuntu_24_04: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| cc: [13] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-${{ matrix.cc }} g++-${{ matrix.cc }} ninja-build ccache | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.cc }} 100 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.cc }} 100 | |
| echo "/usr/lib/ccache" >> $GITHUB_PATH | |
| - name: Cache blade build dir | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build64_release | |
| key: blade-${{ runner.os }}-${{ matrix.cc }}-${{ hashFiles('thirdparty/**/*.tar.gz', 'thirdparty/**/*.zip', 'thirdparty/**/BUILD', 'thirdparty/**/*.patch') }} | |
| restore-keys: | | |
| blade-${{ runner.os }}-${{ matrix.cc }}- | |
| - name: Cache ccache db | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-${{ runner.os }}-${{ matrix.cc }}-${{ github.sha }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ matrix.cc }}- | |
| - name: ccache stats (before) | |
| run: ccache --zero-stats && ccache --show-config | |
| - name: Pin vcpkg to the baseline | |
| # CI runners ship a stale vcpkg clone whose ports / version DB predate the | |
| # baseline pinned in BLADE_ROOT's vcpkg_config. Fetch that commit and check | |
| # it out so versions/*.json and ports/ are consistent with the baseline -- | |
| # otherwise vcpkg resolves a baseline version (e.g. openssl 3.6.3) that the | |
| # stale working-tree version DB has no entry for. (The vcpkg tool binary is | |
| # untracked, so checkout leaves it in place.) | |
| shell: bash | |
| run: | | |
| VCPKG_DIR="${VCPKG_INSTALLATION_ROOT:-/usr/local/share/vcpkg}" | |
| git -C "$VCPKG_DIR" fetch --depth 1 origin 06a7fdd564234908731c59ac46a624f808e87b1c | |
| git -C "$VCPKG_DIR" checkout -f 06a7fdd564234908731c59ac46a624f808e87b1c | |
| - name: Build | |
| run: ./blade build ... -k | |
| - name: ccache stats (after) | |
| run: ccache --show-stats | |
| - name: Run tests | |
| # BLADE_ROOT sets test_timeout=60 -- the slowest legit test runs in | |
| # ~40s on M2 release/-O2. GHA runners are slower and contended, so | |
| # scale up here. 5x = 300s effective; still tight enough that a real | |
| # hang (10+ min) is caught fast. | |
| run: ./blade test --test-timeout-multiplier=5 ... | |
| build_on_macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Cache blade build dir | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build64_release | |
| key: blade-${{ runner.os }}-${{ hashFiles('thirdparty/**/*.tar.gz', 'thirdparty/**/*.zip', 'thirdparty/**/BUILD', 'thirdparty/**/*.patch') }} | |
| restore-keys: | | |
| blade-${{ runner.os }}- | |
| # blade uses the system cmake/ninja on macOS (cmake is preinstalled on the | |
| # runner; ninja is not). autoconf/automake/libtool are needed by autotools- | |
| # based thirdparty packages (e.g. jemalloc's autogen.sh). | |
| - name: Install dependencies | |
| run: | | |
| brew install ninja autoconf automake libtool ccache | |
| # brew's ccache pkg installs symlinks (gcc, g++, clang, ...) into | |
| # $(brew --prefix)/opt/ccache/libexec. Same trick as Linux. | |
| echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH | |
| - name: Cache ccache db | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/Library/Caches/ccache | |
| key: ccache-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}- | |
| - name: ccache stats (before) | |
| run: ccache --zero-stats && ccache --show-config | |
| - name: Pin vcpkg to the baseline | |
| # CI runners ship a stale vcpkg clone whose ports / version DB predate the | |
| # baseline pinned in BLADE_ROOT's vcpkg_config. Fetch that commit and check | |
| # it out so versions/*.json and ports/ are consistent with the baseline -- | |
| # otherwise vcpkg resolves a baseline version (e.g. openssl 3.6.3) that the | |
| # stale working-tree version DB has no entry for. (The vcpkg tool binary is | |
| # untracked, so checkout leaves it in place.) | |
| shell: bash | |
| run: | | |
| VCPKG_DIR="${VCPKG_INSTALLATION_ROOT:-/usr/local/share/vcpkg}" | |
| git -C "$VCPKG_DIR" fetch --depth 1 origin 06a7fdd564234908731c59ac46a624f808e87b1c | |
| git -C "$VCPKG_DIR" checkout -f 06a7fdd564234908731c59ac46a624f808e87b1c | |
| - name: Build | |
| run: ./blade build flare/... -k | |
| - name: ccache stats (after) | |
| run: ccache --show-stats | |
| # Fiber tests under ASan/TSan -- regression guard for the fiber-switch | |
| # sanitizer fixes (#134 ASan/TSan SEGV, #196 detect_stack_use_after_return). | |
| # Uses Bazel + clang, the configuration that surfaced those bugs (flare's | |
| # other CI is blade-based). Scoped to a curated set of fiber tests that pass | |
| # cleanly under both sanitizers: the full //flare/fiber/... has unrelated | |
| # sanitizer issues (curl foreign_cc build under -fsanitize, a few sync- | |
| # primitive tests, TSan timeouts) that are out of scope here. | |
| sanitizer_fiber: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| san: [asan, tsan] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up bazelisk | |
| # Use the runner's default clang. annotation.h now includes compiler-rt's | |
| # <sanitizer/tsan_interface.h> instead of hand-declaring __tsan_* symbols, | |
| # so the TSan build is no longer tied to a specific clang version. | |
| run: | | |
| # Download bazelisk to a temp path, NOT the repo root -- flare tracks a | |
| # `bazel/` directory, so `-o bazel` here would fail (can't write a dir). | |
| curl -fsSL -o "$RUNNER_TEMP/bazelisk" \ | |
| https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-linux-amd64 | |
| sudo install -m 0755 "$RUNNER_TEMP/bazelisk" /usr/local/bin/bazel | |
| clang --version | |
| bazel version | head -1 | |
| - name: Fiber tests under ${{ matrix.san }} | |
| # A focused set that exercises fiber creation / resume / switch -- enough | |
| # to catch any regression of the switch fixes (a broken switch crashes ALL | |
| # fiber tests on the first resume). Kept small on purpose: the heavier | |
| # sync-primitive tests are pathologically slow under TSan on shared 2-4 | |
| # core runners. --test_timeout=300 makes a hang fail fast. | |
| run: | | |
| bazel test --config=llvm --config=${{ matrix.san }} \ | |
| --test_timeout=300 --keep_going \ | |
| //flare/fiber:future_test \ | |
| //flare/fiber:this_fiber_test \ | |
| //flare/fiber:timer_test \ | |
| //flare/fiber:runtime_test \ | |
| //flare/fiber/detail:fiber_entity_test \ | |
| //flare/fiber/detail:stack_allocator_test |