aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <japaricious@gmail.com> 2017-04-08 09:37:15 -0500
committerGravatar Jorge Aparicio <japaricious@gmail.com> 2017-04-08 09:37:15 -0500
commite47c04aa4b1e7adab2760ce5408b22d78e6a45e5 (patch)
tree5a638d8133be85f4a0f53c3d0d95a66054422f71
parentd4dec0124b961bef1f36b7da986b5d47fc9cbe15 (diff)
downloadcortex-m-e47c04aa4b1e7adab2760ce5408b22d78e6a45e5.tar.gz
cortex-m-e47c04aa4b1e7adab2760ce5408b22d78e6a45e5.tar.zst
cortex-m-e47c04aa4b1e7adab2760ce5408b22d78e6a45e5.zip
v0.2.2v0.2.2
-rw-r--r--CHANGELOG.md25
-rw-r--r--Cargo.toml2
2 files changed, 24 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51608d8..264ca26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,14 +7,35 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
-## [v0.2.1] - 2017-03-12
+## [v0.2.2] - 2017-04-08
+
+### Fixed
+
+- MEMORY SAFETY BUG. The `Mutex.borrow_mut` method has been removed as it can be
+ used to bypass Rust's borrow checker and get, for example, two mutable
+ references to the same data.
+
+``` rust
+static FOO: Mutex<bool> = Mutex::new(false);
+
+fn main() {
+ cortex_m::interrupt::free(|mut cs1| {
+ cortex_m::interrupt::free(|mut cs2| {
+ let foo = FOO.borrow_mut(&mut cs1);
+ let and_foo = FOO.borrow_mut(&mut cs2);
+ });
+ });
+}
+```
+
+## [v0.2.1] - 2017-03-12 - YANKED
### Changed
- The default exception handler now identifies the exception that's being
serviced.
-## [v0.2.0] - 2017-03-11
+## [v0.2.0] - 2017-03-11 - YANKED
### Added
diff --git a/Cargo.toml b/Cargo.toml
index ca42a71..6061f91 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ keywords = ["arm", "cortex-m", "register", "peripheral"]
license = "MIT OR Apache-2.0"
name = "cortex-m"
repository = "https://github.com/japaric/cortex-m"
-version = "0.2.1"
+version = "0.2.2"
[dependencies]
volatile-register = "0.2.0"