1
0
forked from ROMEO/nexosim
Files
nexosim/.github/workflows/loom.yml
T
Serge Barral af3d68e76f Force the waker VTable to be uniquely instantiated
From Rust 1.78, `Waker::will_wake` tests equality by comparing the VTable
pointers rather than the content of the VTable.

Unfortunately, this exposes some instability in the code generation
which sometimes causes several VTables to be instantiated in memory for
the same generic parameters. This can in turn defeat `Waker::will_wake`
if e.g. `Waker::clone` and `Waker::wake_by_*` end up with different
pointers.

The problemt is hopefully addressed by preventing inlining of the VTable
generation function. A test has been added to try to detect regression,
though the test may not be 100% reliable.
2024-05-07 01:37:47 +02:00

34 lines
920 B
YAML

name: Loom
on:
pull_request:
push:
branches: [ main ]
paths:
- 'asynchronix/src/channel.rs'
- 'asynchronix/src/channel/**'
- 'asynchronix/src/executor/task.rs'
- 'asynchronix/src/executor/task/**'
- 'asynchronix/src/loom_exports.rs'
- 'asynchronix/src/ports/output/broadcaster.rs'
- 'asynchronix/src/ports/output/broadcaster/**'
- 'asynchronix/src/ports/source/broadcaster.rs'
- 'asynchronix/src/ports/source/broadcaster/**'
- 'asynchronix/src/util/slot.rs'
- 'asynchronix/src/util/sync_cell.rs'
jobs:
loom:
name: Loom
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo test (Loom)
run: cargo test --tests --release
env:
RUSTFLAGS: --cfg asynchronix_loom