Skip to content

Expands the API and reroutes all allocation through GlobalCtx #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2a64921
Fixed UI tests, ensuring that our instrumentation is actually inserte…
icmccorm Mar 20, 2025
2924079
fmt
icmccorm Mar 20, 2025
0c6f8aa
Cleaned-up arg insertion.
icmccorm Mar 20, 2025
b4eed9b
fmt
icmccorm Mar 20, 2025
478115f
Removed unused dependency.
icmccorm Mar 20, 2025
335991f
Set minimum stage to 2.
icmccorm Mar 23, 2025
c04ac91
Added back link to host sysroot for platforms that use dynamic librar…
icmccorm Mar 23, 2025
a717b97
Added BSAN_RT_SYSROOT for cross-stage linking.
icmccorm Mar 24, 2025
1eb41fa
Added back lto for bsan_rt.
icmccorm Mar 24, 2025
72974c1
Updated bsan_rt API to use return pointers for provenance, and re-rou…
icmccorm Mar 20, 2025
ec1a339
Updated LLVM submodule.
icmccorm Mar 25, 2025
8d00ac8
Updated LLVM submodule.
icmccorm Mar 25, 2025
fe35770
Added API endpoints for copying and clearing shadow memory.
icmccorm Mar 27, 2025
d03712e
Switched to GlobalCtx, moved tests, added BsanAllocHooks.
icmccorm Mar 27, 2025
206e1bf
Fixed various syntax errors under #[cfg(test)].
icmccorm Mar 27, 2025
3192b8a
fmt
icmccorm Mar 27, 2025
06a66da
Fixed signed-ness of OFF_T using a wrapper for mmap.
icmccorm Mar 28, 2025
503d0b9
Fixed cast formatting.
icmccorm Mar 28, 2025
7c9c3df
Update deps.
icmccorm Mar 28, 2025
3ee52b7
Switched to c_ulonglong in mmap.
icmccorm Mar 30, 2025
96864e9
Added GlobalCtx::exit()
icmccorm Mar 30, 2025
995a1e3
Updated submodule and fmt.
icmccorm Mar 31, 2025
39c26bb
fmt
icmccorm Mar 31, 2025
17c3ae7
Switched to using dedicated alloc ID values for provenance.
icmccorm Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,10 @@ name = "bsan-rt"
version = "0.1.0"
dependencies = [
"cbindgen",
"env_logger",
"hashbrown 0.15.2",
"libc",
"log",
"rustc-hash 2.1.1",
"smallvec",
]

[[package]]
Expand Down Expand Up @@ -1610,10 +1611,11 @@ dependencies = [

[[package]]
name = "hashbrown"
version = "0.15.0"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
dependencies = [
"allocator-api2",
"foldhash",
]

Expand Down Expand Up @@ -1870,7 +1872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
dependencies = [
"equivalent",
"hashbrown 0.15.0",
"hashbrown 0.15.2",
"rustc-rayon",
"serde",
]
Expand Down Expand Up @@ -2012,7 +2014,7 @@ dependencies = [
"anyhow",
"clap",
"fs-err",
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"rustdoc-json-types",
"serde",
"serde_json",
Expand Down Expand Up @@ -2561,7 +2563,7 @@ checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
dependencies = [
"crc32fast",
"flate2",
"hashbrown 0.15.0",
"hashbrown 0.15.2",
"indexmap",
"memchr",
"ruzstd",
Expand Down Expand Up @@ -3178,7 +3180,7 @@ dependencies = [
"proc-macro2",
"quote",
"rinja_parser",
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"serde",
"syn 2.0.87",
]
Expand Down Expand Up @@ -3242,9 +3244,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"

[[package]]
name = "rustc-hash"
version = "2.0.0"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"

[[package]]
name = "rustc-main"
Expand Down Expand Up @@ -3626,7 +3628,7 @@ dependencies = [
"memmap2",
"parking_lot",
"portable-atomic",
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"rustc-rayon",
"rustc-stable-hash",
"rustc_arena",
Expand Down Expand Up @@ -4327,7 +4329,7 @@ dependencies = [
name = "rustc_pattern_analysis"
version = "0.0.0"
dependencies = [
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"rustc_abi",
"rustc_apfloat",
"rustc_arena",
Expand Down Expand Up @@ -4723,7 +4725,7 @@ name = "rustdoc-json-types"
version = "0.1.0"
dependencies = [
"bincode",
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"serde",
"serde_json",
]
Expand Down Expand Up @@ -4986,9 +4988,9 @@ dependencies = [

[[package]]
name = "smallvec"
version = "1.13.2"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"

[[package]]
name = "socket2"
Expand Down Expand Up @@ -5367,7 +5369,7 @@ dependencies = [
"ignore",
"miropt-test-tools",
"regex",
"rustc-hash 2.0.0",
"rustc-hash 2.1.1",
"semver",
"similar",
"termcolor",
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/retag.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/llvm-project
6 changes: 6 additions & 0 deletions src/tools/bsan/bsan-rt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ edition = "2021"

[dependencies]
libc = { version = "0.2.169", default-features = false }
hashbrown = { version = "0.15.2", default-features = false, features = ["default-hasher", "nightly", "inline-more"] }
rustc-hash = { version = "2.1.1", default-features = false }
smallvec = { version = "1.14.0" }

[lib]
name = "bsan_rt"
crate-type = ["staticlib"]
test = true # we have unit tests
doctest = false # but no doc tests

[features]
ui_test = []

[build-dependencies]
cbindgen = "0.28.0"
73 changes: 0 additions & 73 deletions src/tools/bsan/bsan-rt/src/bsan_alloc.rs

This file was deleted.

Loading