3535 WORKER_INDEX : ${{ matrix.partition }}
3636 # Total number of workers running this step
3737 WORKER_TOTAL : 4
38+ # Cap parallel harness verification on ubuntu-latest: its 4-core/16 GB
39+ # runners get OOM-killed when 4 memory-hungry harnesses (up to ~10 GB
40+ # each, e.g. the ffi::c_str ones) run concurrently.
41+ KANI_JOBS : ${{ matrix.os == 'ubuntu-latest' && 2 || '' }}
3842
3943 steps :
4044 - name : Remove unnecessary software to free up disk space
@@ -97,6 +101,11 @@ jobs:
97101 # Notes:
98102 # - core_arch::x86::__m128d::as_f64x2 is just one example of hundreds of
99103 # core_arch::x86:: functions that are known to verify successfully.
104+ # - __rdl_dealloc/__rdl_realloc are excluded until their contracts require ptr
105+ # to come from the allocator (#712).
106+ # - unicode::unicode_data::conversions::to_* are not listed for now: since the
107+ # Unicode tables were regenerated (nightly-2026-09-25) they exceed the 10m
108+ # timeout on macOS and the ubuntu runner died while verifying them.
100109 - name : Run Kani Verification
101110 run : |
102111 scripts/run-kani.sh --run autoharness --kani-args \
@@ -105,8 +114,10 @@ jobs:
105114 --include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::backward_unchecked" \
106115 --include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::forward_unchecked" \
107116 --include-pattern alloc::__default_lib_allocator:: \
117+ --exclude-pattern "alloc::__default_lib_allocator::__rdl_(dealloc|realloc)" \
108118 --include-pattern alloc::layout::Layout::from_size_align \
109119 --include-pattern ascii::ascii_char::AsciiChar::from_u8 \
120+ --include-pattern "<char[[:space:]]as[[:space:]]ascii::AsciiExt>::is_ascii" \
110121 --include-pattern char::convert::from_u32_unchecked \
111122 --include-pattern core_arch::x86::__m128d::as_f64x2 \
112123 --include-pattern "convert::num::<impl.convert::From<num::nonzero::NonZero<" \
@@ -201,7 +212,6 @@ jobs:
201212 --exclude-pattern time::Duration::from_nanos_u128 \
202213 --include-pattern time::Duration::from_secs \
203214 --exclude-pattern time::Duration::from_secs_f \
204- --include-pattern unicode::unicode_data::conversions::to_ \
205215 --exclude-pattern ::precondition_check \
206216 --harness-timeout 10m \
207217 --default-unwind 1000 \
@@ -251,8 +261,18 @@ jobs:
251261 with :
252262 python-version : ' 3.x'
253263
264+ - name : Test the metrics script
265+ run : |
266+ pip install -r scripts/kani-std-analysis/requirements.txt
267+ python3 -m unittest discover -s scripts/kani-std-analysis
268+
254269 # Step 2: Run list on the std library
255270 - name : Run Kani Metrics
271+ # Under Kani each library crate takes 1-12 GB to compile; compiling them in parallel
272+ # exceeds the 16 GB of an ubuntu-latest runner, which then dies with "The runner has
273+ # received a shutdown signal". One crate at a time peaks at the largest one (std).
274+ env :
275+ CARGO_BUILD_JOBS : 1
256276 run : |
257277 scripts/run-kani.sh --run metrics --with-autoharness
258278 pushd /tmp/std_lib_analysis
@@ -349,6 +369,11 @@ jobs:
349369
350370 # Step 2: Run list on the std library
351371 - name : Run Kani List
372+ # Under Kani each library crate takes 1-12 GB to compile; compiling them in parallel
373+ # exceeds the 16 GB of an ubuntu-latest runner, which then dies with "The runner has
374+ # received a shutdown signal". One crate at a time peaks at the largest one (std).
375+ env :
376+ CARGO_BUILD_JOBS : 1
352377 run : |
353378 head/scripts/run-kani.sh --run list --with-autoharness --path ${{github.workspace}}/head
354379 # remove duplicate white space to reduce file size (GitHub permits at
0 commit comments