Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 24f5e0f

Browse files
Merge #205
205: Stop using randomized symbol names r=therealprof a=jonas-schievink It isn't possible to do this by incrementing a global counter, since the expansion order of macros isn't guaranteed and might change between compiler invocations. Fixes #212 Closes #196 Closes #195 Co-authored-by: Jonas Schievink <[email protected]>
2 parents f17983a + 1efe5ef commit 24f5e0f

File tree

9 files changed

+244
-182
lines changed

9 files changed

+244
-182
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Macros now generate a second trampoline function instead of randomizing the
13+
function's symbol name. This makes the build deterministic.
14+
- [breaking-change] `static mut` resources no longer have `'static` lifetime
15+
except in the `#[entry]` function (this is a soundness fix; see [#212]).
16+
17+
[#212]: https://github.com/rust-embedded/cortex-m-rt/issues/212
18+
1019
## [v0.6.10] - 2019-07-25
1120

1221
### Fixed

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ cortex-m = "0.6"
2424
panic-halt = "0.2.0"
2525
cortex-m-semihosting = "0.3"
2626

27-
[dev-dependencies.rand]
28-
default-features = false
29-
features = ["small_rng"]
30-
version = "0.7"
31-
3227
[target.'cfg(not(target_os = "none"))'.dev-dependencies]
3328
compiletest_rs = "0.4.0"
3429

3530
[[example]]
3631
name = "device"
3732
required-features = ["device"]
3833

34+
[[test]]
35+
name = "compiletest"
36+
required-features = ["device"]
37+
3938
[features]
4039
device = []
4140

ci/script.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ main() {
2323
override-exception
2424
pre_init
2525
qemu
26-
rand
2726
state
2827
unsafe-default-handler
2928
unsafe-entry

examples/rand.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

macros/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,5 @@ proc-macro2 = "1.0"
2121
features = ["extra-traits", "full"]
2222
version = "1.0"
2323

24-
[dependencies.rand]
25-
default-features = false
26-
features = ["small_rng"]
27-
version = "0.7"
28-
2924
[dev-dependencies]
3025
cortex-m-rt = { path = "..", version = "0.6" }

0 commit comments

Comments
 (0)