Skip to content

Commit 0681b97

Browse files
authored
Merge pull request #83 from 197g/ci-failures
Update release info for static-alloc-v0.2.6
2 parents 2c78217 + 184b976 commit 0681b97

File tree

14 files changed

+23
-15
lines changed

14 files changed

+23
-15
lines changed

LICENSE.MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 Andreas Molzer
1+
Copyright 2019 Aurelia Molzer
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

LICENSE.ZLIB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2021 Andreas Molzer
1+
Copyright (c) 2021 Aurelia Molzer
22

33
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
44

alloc-traits/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "alloc-traits"
33
version = "0.1.1"
44
description = "Traits to replace or supplement the alloc module in no_std"
5-
authors = ["Andreas Molzer <[email protected]>"]
5+
authors = ["Aurelia Molzer <[email protected]>"]
66
edition = "2018"
77
license = "MIT OR Apache-2.0 OR Zlib"
88
documentation = "https://docs.rs/static-alloc"

alloc-traits/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! [`static-alloc`]: https://crates.io/crates/static-alloc
1616
//! [`without-alloc`]: https://crates.io/crates/without-alloc
1717
18-
// Copyright 2019-2021 Andreas Molzer
18+
// Copyright 2019-2021 Aurelia Molzer
1919
#![no_std]
2020
#![deny(missing_docs)]
2121

exit-stack/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "exit-stack"
33
version = "0.1.0"
44
description = "Dynamically pin values to the stack, with no macros."
5-
authors = ["Andreas Molzer <[email protected]>"]
5+
authors = ["Aurelia Molzer <[email protected]>"]
66
edition = "2018"
77
license = "MIT"
88
documentation = "https://docs.rs/exit-stack"

fill/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "fill"
33
version = "0.1.1"
44
description = "Provides the Fill trait, an alternative to Extend for finite containers"
5-
authors = ["Andreas Molzer <[email protected]>"]
5+
authors = ["Aurelia Molzer <[email protected]>"]
66
edition = "2018"
77
license = "MIT OR Apache-2.0 OR Zlib"
88
documentation = "https://docs.rs/fill"

static-alloc/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "static-alloc"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = "A bump allocator on static memory for the alloc-traits crate"
5-
authors = ["Andreas Molzer <[email protected]>"]
5+
authors = ["Aurelia Molzer <[email protected]>"]
66
edition = "2018"
77
license = "MIT OR Apache-2.0 OR Zlib"
88
documentation = "https://docs.rs/static-alloc"
9-
repository = "https://github.com/HeroicKatora/static-alloc"
9+
repository = "https://github.com/197g/static-alloc"
1010
readme = "Readme.md"
1111
categories = ["embedded", "memory-management", "no-std"]
1212

static-alloc/Changes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# v0.2.6
2+
3+
- Fix an unsoundness bug in `MemBump::new` (available under feature `alloc`)
4+
that left the counter of occupied bytes uninitialized.
5+
16
# v0.2.5
27

38
- Bump `atomic-polyfill` to `1`, as discovered during Debian packaging.

static-alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//! dynamic values without accidentally exposing or using uninitialized memory. This allows
4141
//! obtaining `&'static mut T` instances which is handy if a struct requires a mutable reference
4242
//! but it is also required that this struct has `'static` lifetime bounds itself.
43-
// Copyright 2019,2022 Andreas Molzer
43+
// Copyright 2019,2022 Aurelia Molzer
4444
#![no_std]
4545
#![deny(missing_docs)]
4646

static-alloc/src/unsync/bump.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ impl MemBump {
251251
/// This is how many *bytes* can be allocated
252252
/// within this node.
253253
pub const fn capacity(&self) -> usize {
254-
self.data.get().len()
254+
// Safety: just gets the pointer metadata `len` without invalidating any provenance,
255+
// accepting the pointer use itself. This may be replaced by a safe `pointer::len` as soon
256+
// as stable (#71146) and const which would avoid any pointer use.
257+
unsafe { (*(self.data.get() as *const [UnsafeCell<u8>])).len() }
255258
}
256259

257260
/// Get a raw pointer to the data.

0 commit comments

Comments
 (0)