Skip to content

Commit accc516

Browse files
committed
Auto merge of #122538 - RalfJung:miri, r=RalfJung
Miri subtree update r? `@ghost`
2 parents d7723b2 + 6d9549f commit accc516

21 files changed

+59
-653
lines changed

src/tools/miri/.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
166166
run: |
167167
~/.local/bin/zulip-send --user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com \
168-
--stream miri --subject "Cron Job Failure (miri, $(date -u +%Y-%m))" \
168+
--stream miri --subject "Miri Build Failure ($(date -u +%Y-%m))" \
169169
--message 'Dear @*T-miri*,
170170
171171
It would appear that the [Miri cron job build]('"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"') failed.

src/tools/miri/.github/workflows/sysroots.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,25 @@ jobs:
2121
./miri install
2222
python3 -m pip install beautifulsoup4
2323
./ci/build-all-targets.sh
24+
- name: Upload build errors
25+
# We don't want to skip this step on failure
26+
if: always()
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: failures
30+
path: failures.tar.gz
2431

2532
sysroots-cron-fail-notify:
2633
name: sysroots cronjob failure notification
2734
runs-on: ubuntu-latest
2835
needs: [sysroots]
2936
if: failure() || cancelled()
3037
steps:
38+
# Download our build error logs
39+
- name: Download build errors
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: failures
3143
# Send a Zulip notification
3244
- name: Install zulip-send
3345
run: pip3 install zulip
@@ -36,11 +48,12 @@ jobs:
3648
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
3749
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
3850
run: |
51+
tar xf failures.tar.gz
52+
ls failures
3953
~/.local/bin/zulip-send --user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com \
40-
--stream miri --subject "Cron Job Failure (miri, $(date -u +%Y-%m))" \
41-
--message 'Dear @*T-miri*,
42-
43-
It would appear that the [Miri sysroots cron job build]('"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"') failed.
54+
--stream miri --subject "Sysroot Build Errors ($(date -u +%Y-%m))" \
55+
--message 'It would appear that the [Miri sysroots cron job build]('"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"') failed to build these targets:
56+
'"$(ls failures)"'
4457
4558
Would you mind investigating this issue?
4659

src/tools/miri/cargo-miri/src/phases.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
9595
let target = get_arg_flag_value("--target");
9696
let target = target.as_ref().unwrap_or(host);
9797

98-
// If cleaning the the target directory & sysroot cache,
98+
// If cleaning the target directory & sysroot cache,
9999
// delete them then exit. There is no reason to setup a new
100100
// sysroot in this execution.
101101
if let MiriCommand::Clean = subcommand {

src/tools/miri/ci/build-all-targets.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -eu
44
set -o pipefail
55

6+
# .github/workflows/sysroots.yml relies on this name this to report which sysroots didn't build
67
FAILS_DIR=failures
78

89
rm -rf $FAILS_DIR
@@ -13,14 +14,16 @@ PLATFORM_SUPPORT_FILE=$(rustc +miri --print sysroot)/share/doc/rust/html/rustc/p
1314
for target in $(python3 ci/scrape-targets.py $PLATFORM_SUPPORT_FILE); do
1415
# Wipe the cache before every build to minimize disk usage
1516
cargo +miri miri clean
16-
if cargo +miri miri setup --target $target 2>&1 | tee failures/$target; then
17+
if cargo +miri miri setup --target $target 2>&1 | tee $FAILS_DIR/$target; then
1718
# If the build succeeds, delete its output. If we have output, a build failed.
1819
rm $FAILS_DIR/$target
1920
fi
2021
done
2122

23+
tar czf $FAILS_DIR.tar.gz $FAILS_DIR
24+
2225
# If the sysroot for any target fails to build, we will have a file in FAILS_DIR.
23-
if [[ $(ls failures | wc -l) -ne 0 ]]; then
26+
if [[ $(ls $FAILS_DIR | wc -l) -ne 0 ]]; then
2427
echo "Sysroots for the following targets failed to build:"
2528
ls $FAILS_DIR
2629
exit 1

src/tools/miri/rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4d4bb491b65c300835442f6cb4f34fc9a5685c26
1+
ee03c286cfdca26fa5b2a4ee40957625d2c826ff

src/tools/miri/src/concurrency/data_race.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,12 @@ impl VClockAlloc {
10741074
size: Size,
10751075
machine: &mut MiriMachine<'_, '_>,
10761076
) -> InterpResult<'tcx> {
1077-
self.unique_access(alloc_id, alloc_range(Size::ZERO, size), NaWriteType::Deallocate, machine)
1077+
self.unique_access(
1078+
alloc_id,
1079+
alloc_range(Size::ZERO, size),
1080+
NaWriteType::Deallocate,
1081+
machine,
1082+
)
10781083
}
10791084
}
10801085

src/tools/miri/src/diagnostics.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
527527
pub fn emit_diagnostic(&self, e: NonHaltingDiagnostic) {
528528
use NonHaltingDiagnostic::*;
529529

530-
let stacktrace =
531-
Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack());
530+
let stacktrace = Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack());
532531
let (stacktrace, _was_pruned) = prune_stacktrace(stacktrace, self);
533532

534533
let (title, diag_level) = match &e {

src/tools/miri/src/shims/windows/foreign_items.rs

-45
Original file line numberDiff line numberDiff line change
@@ -297,32 +297,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
297297
}
298298

299299
// Synchronization primitives
300-
"AcquireSRWLockExclusive" => {
301-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
302-
this.AcquireSRWLockExclusive(ptr)?;
303-
}
304-
"ReleaseSRWLockExclusive" => {
305-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
306-
this.ReleaseSRWLockExclusive(ptr)?;
307-
}
308-
"TryAcquireSRWLockExclusive" => {
309-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
310-
let ret = this.TryAcquireSRWLockExclusive(ptr)?;
311-
this.write_scalar(ret, dest)?;
312-
}
313-
"AcquireSRWLockShared" => {
314-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
315-
this.AcquireSRWLockShared(ptr)?;
316-
}
317-
"ReleaseSRWLockShared" => {
318-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
319-
this.ReleaseSRWLockShared(ptr)?;
320-
}
321-
"TryAcquireSRWLockShared" => {
322-
let [ptr] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
323-
let ret = this.TryAcquireSRWLockShared(ptr)?;
324-
this.write_scalar(ret, dest)?;
325-
}
326300
"InitOnceBeginInitialize" => {
327301
let [ptr, flags, pending, context] =
328302
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
@@ -335,25 +309,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
335309
let result = this.InitOnceComplete(ptr, flags, context)?;
336310
this.write_scalar(result, dest)?;
337311
}
338-
"SleepConditionVariableSRW" => {
339-
let [condvar, lock, timeout, flags] =
340-
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
341-
342-
let result = this.SleepConditionVariableSRW(condvar, lock, timeout, flags, dest)?;
343-
this.write_scalar(result, dest)?;
344-
}
345-
"WakeConditionVariable" => {
346-
let [condvar] =
347-
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
348-
349-
this.WakeConditionVariable(condvar)?;
350-
}
351-
"WakeAllConditionVariable" => {
352-
let [condvar] =
353-
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
354-
355-
this.WakeAllConditionVariable(condvar)?;
356-
}
357312
"WaitOnAddress" => {
358313
let [ptr_op, compare_op, size_op, timeout_op] =
359314
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;

0 commit comments

Comments
 (0)