diff options
-rw-r--r-- | CHANGELOG.md | 25 | ||||
-rw-r--r-- | Cargo.toml | 2 |
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 @@ -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" |