Skip to content

Commit f12133c

Browse files
bors[bot]taiki-e
andauthored
Merge #853
853: Prepare for the next release r=taiki-e a=taiki-e - crossbeam-utils 0.8.9 -> 0.8.10 - Fix unsoundness of `AtomicCell` on types containing niches. (#834) This fix contains breaking changes, but they are allowed because this is a soundness bug fix. See #834 for more. Co-authored-by: Taiki Endo <[email protected]>
2 parents 9e9ff76 + 3c86b9b commit f12133c

File tree

5 files changed

+66
-8
lines changed

5 files changed

+66
-8
lines changed

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ jobs:
160160
runs-on: ubuntu-latest
161161
steps:
162162
- uses: actions/checkout@v3
163-
# TODO: unpin nightly toolchain once https://github.com/rust-lang/miri/issues/2223 fixed.
164163
- name: Install Rust
165-
run: rustup toolchain install nightly-2022-06-08 --component miri && rustup default nightly-2022-06-08
164+
run: rustup toolchain install nightly --component miri && rustup default nightly
166165
- name: miri
167166
run: ./ci/miri.sh
168167

ci/miri.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,35 @@ cd "$(dirname "$0")"/..
55

66
export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout"
77

8-
MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation" \
8+
# disable preemption due to https://github.com/rust-lang/rust/issues/55005
9+
MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-preemption-rate=0" \
910
cargo miri test \
1011
-p crossbeam-queue \
1112
-p crossbeam-utils
1213

1314
# -Zmiri-ignore-leaks is needed because we use detached threads in tests/docs: https://github.com/rust-lang/miri/issues/1371
14-
MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks" \
15+
# disable preemption due to https://github.com/rust-lang/rust/issues/55005
16+
MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks -Zmiri-preemption-rate=0" \
1517
cargo miri test \
1618
-p crossbeam-channel
1719

1820
# -Zmiri-ignore-leaks is needed for https://github.com/crossbeam-rs/crossbeam/issues/579
1921
# -Zmiri-disable-stacked-borrows is needed for https://github.com/crossbeam-rs/crossbeam/issues/545
20-
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks" \
22+
# disable preemption due to https://github.com/rust-lang/rust/issues/55005
23+
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks -Zmiri-preemption-rate=0" \
2124
cargo miri test \
2225
-p crossbeam-epoch \
2326
-p crossbeam-skiplist
2427

2528
# -Zmiri-ignore-leaks is needed for https://github.com/crossbeam-rs/crossbeam/issues/579
2629
# -Zmiri-disable-stacked-borrows is needed for https://github.com/crossbeam-rs/crossbeam/issues/545
27-
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks -Zmiri-compare-exchange-weak-failure-rate=0.0" \
30+
# disable preemption due to https://github.com/rust-lang/rust/issues/55005
31+
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks -Zmiri-compare-exchange-weak-failure-rate=0.0 -Zmiri-preemption-rate=0" \
2832
cargo miri test \
2933
-p crossbeam-deque
3034

3135
# -Zmiri-ignore-leaks is needed for https://github.com/crossbeam-rs/crossbeam/issues/579
32-
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-ignore-leaks" \
36+
# disable preemption due to https://github.com/rust-lang/rust/issues/55005
37+
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-ignore-leaks -Zmiri-preemption-rate=0" \
3338
cargo miri test \
3439
-p crossbeam

crossbeam-utils/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Version 0.8.10
2+
3+
- Fix unsoundness of `AtomicCell` on types containing niches. (#834)
4+
This fix contains breaking changes, but they are allowed because this is a soundness bug fix. See #834 for more.
5+
16
# Version 0.8.9
27

38
- Replace lazy_static with once_cell. (#817)

crossbeam-utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "crossbeam-utils"
44
# - Update CHANGELOG.md
55
# - Update README.md
66
# - Create "crossbeam-utils-X.Y.Z" git tag
7-
version = "0.8.9"
7+
version = "0.8.10"
88
edition = "2018"
99
rust-version = "1.36"
1010
license = "MIT OR Apache-2.0"

tools/publish.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
cd "$(dirname "$0")"/..
5+
6+
# Publish a new release.
7+
#
8+
# USAGE:
9+
# ./tools/publish.sh <CRATE> <VERSION>
10+
11+
bail() {
12+
echo >&2 "error: $*"
13+
exit 1
14+
}
15+
16+
crate="${1:?}"
17+
version="${2:?}"
18+
version="${version#v}"
19+
tag="${crate}-${version}"
20+
if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$ ]]; then
21+
bail "invalid version format '${version}'"
22+
fi
23+
if [[ $# -gt 2 ]]; then
24+
bail "invalid argument '$3'"
25+
fi
26+
27+
# Make sure there is no uncommitted change.
28+
git diff --exit-code
29+
git diff --exit-code --staged
30+
31+
# Make sure the same release has not been created in the past.
32+
if gh release view "${tag}" &>/dev/null; then
33+
bail "tag '${tag}' has already been created and pushed"
34+
fi
35+
36+
if ! git branch | grep -q '\* master'; then
37+
bail "current branch is not 'master'"
38+
fi
39+
40+
git tag "${tag}"
41+
42+
(
43+
if [[ "${crate}" != "crossbeam" ]]; then
44+
cd "${crate}"
45+
fi
46+
cargo publish
47+
)
48+
49+
git push origin --tags

0 commit comments

Comments
 (0)