diff --git a/.gitea/workflows/gitea-build.yaml b/.gitea/workflows/gitea-build.yaml index 5639d70..73ab746 100644 --- a/.gitea/workflows/gitea-build.yaml +++ b/.gitea/workflows/gitea-build.yaml @@ -30,18 +30,23 @@ jobs: - name: Test run: just test + - name: Debug Segfault + if: failure() + run: | + uname -a + cat /etc/os-release || true + clang --version + ulimit -a + free -h || true + SUDO=""; command -v sudo >/dev/null && SUDO=sudo + $SUDO apt-get install -y --no-install-recommends gdb >/dev/null + gdb -batch -ex run -ex bt -ex "info registers" build/tests + - name: Build run: just release - # Cross-compiles for Windows so link breakages show up before a release. - # Runs after `build`: both jobs land on the same self-hosted runner, and the - # first run segfaulted `odin test` in `build` while `windows` was doing its - # (uncached) SDK download/splat at the same time - resource contention, not - # a code or toolchain bug (odin check passed; the test suite reproduces fine - # in isolation). Sequencing avoids that contention at the cost of a longer - # total run. + # Cross-compiles for Windows so link breakages show up before a release windows: - needs: build runs-on: ubuntu-latest steps: - name: Checkout Repository diff --git a/AGENTS.md b/AGENTS.md index d4ab144..efe0811 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -38,7 +38,7 @@ Commands (see `justfile`): `just run`, `just check`, `just test`, `just package 6. **Windows builds are cross-compiled**: Odin can't link Windows binaries on Linux, so `just windows` builds objects with `-build-mode:obj` and links with `lld-link` against an xwin SDK. The VC runtime is linked statically; only Windows system DLLs are needed. New Odin core usage can need new import libs (e.g. `ole32.lib` for `os.user_data_dir`); the CI `windows` job catches this. Not yet tested on a real Windows machine. 7. **Odin constant arrays can't be indexed at runtime**: lookup tables (`DECKS`, `LAYOUTS`, …) are `@(rodata)` globals instead of `::` constants. 8. **Profile memory**: `profile` always allocates from the heap allocator, because the test runner frees each test's allocator afterwards. -9. **CI jobs share one self-hosted runner**: `build` and `windows` in `gitea-build.yaml` land on the same machine. Running them concurrently once segfaulted `odin test` while `windows` was mid-SDK-download, so `windows` now runs with `needs: build` to avoid the contention. +9. **CI's `build` job segfaults on `odin test`** (exit 139) on the self-hosted runner, even running alone — reproduces every push so far. Does not reproduce locally or in a plain `ubuntu:24.04` container with the same Odin version, so it's specific to the runner's actual job image/environment, not the test code. Under investigation; see the `Debug Segfault` diagnostic step in `gitea-build.yaml`. ## File Structure ```