Skip to content

Commit 02d85de

Browse files
authored
Merge pull request #63 from Imberflur/CI
2 parents 058e13c + f83f215 commit 02d85de

File tree

5 files changed

+81
-23
lines changed

5 files changed

+81
-23
lines changed

.github/workflows/ci.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- "**"
8+
9+
name: CI
10+
11+
jobs:
12+
build_and_test:
13+
name: Build and Test (Linux)
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
rust:
18+
- nightly
19+
- stable
20+
21+
timeout-minutes: 10
22+
23+
env:
24+
RUST_BACKTRACE: 1
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: Setup rust toolchain (stable)
29+
if: matrix.rust == 'stable'
30+
run: |
31+
rustup update
32+
rustup override set stable
33+
34+
- name: Setup rust toolchain (nightly)
35+
if: matrix.rust == 'nightly'
36+
run: |
37+
rustup toolchain install nightly
38+
rustup override set nightly
39+
40+
- name: Build
41+
run: cargo build --verbose
42+
- name: Doc
43+
run: cargo doc --verbose
44+
- name: Test
45+
run: cargo test --verbose
46+
- name: Build (no-default-features)
47+
run: cargo build --verbose --no-default-features
48+
- name: Test (no-default-features)
49+
run: cargo test --verbose --no-default-features
50+
51+
- name: Bench
52+
if: matrix.rust == 'nightly'
53+
run: cargo bench --verbose --no-default-features
54+
55+
56+
# TODO: some tests take a while
57+
58+
# miri:
59+
# name: "Miri"
60+
# runs-on: ubuntu-latest
61+
# steps:
62+
# - uses: actions/checkout@v3
63+
# - name: Install Miri
64+
# run: |
65+
# rustup toolchain install nightly --component miri
66+
# rustup override set nightly
67+
# cargo miri setup
68+
# - name: Test with Miri
69+
# run: cargo miri test

.travis.yml

-20
This file was deleted.

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
## 0.6.4 (2023-07-16)
6+
7+
* Fix UB reported by Miri and remove unmaintained `atom` dependency which has open soundness
8+
issues. ([#61])
9+
10+
[#61]: https://github.com/amethyst/hibitset/pull/61
11+
312
## 0.6.3 (2020-02-17)
413

514
* `BitSetAnd`, `BitSetOr`, `BitSetNot`, `BitSetXor`, `BitSetAll` now implement `Clone`. ([#52])

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hibitset"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
description = "Hierarchical bit set structure"
55
documentation = "https://docs.rs/hibitset"
66
repository = "https://github.com/slide-rs/hibitset"

src/atomic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl Drop for OnceAtom {
212212
if !ptr.is_null() {
213213
// SAFETY: If the pointer is not null, we created it from
214214
// `Box::into_raw` in `Self::atom_get_or_init`.
215-
unsafe { Box::from_raw(ptr) };
215+
drop(unsafe { Box::from_raw(ptr) });
216216
}
217217
}
218218
}
@@ -240,7 +240,7 @@ impl OnceAtom {
240240
) {
241241
// SAFETY: We obtained this pointer from `Box::into_raw` above
242242
// and failed to publish it to the `AtomicPtr`.
243-
unsafe { Box::from_raw(new_ptr) };
243+
drop(unsafe { Box::from_raw(new_ptr) });
244244
existing_ptr
245245
} else {
246246
new_ptr

0 commit comments

Comments
 (0)