Skip to content

Commit 9b970cf

Browse files
committed
properly track C memory management via ptrace
1 parent 6e01f6e commit 9b970cf

File tree

13 files changed

+1363
-26
lines changed

13 files changed

+1363
-26
lines changed

Cargo.lock

Lines changed: 182 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ features = ['unprefixed_malloc_on_supported_platforms']
3939
libc = "0.2"
4040
libffi = "4.0.0"
4141
libloading = "0.8"
42+
nix = { version = "0.30.1", features = ["mman", "ptrace", "signal"] }
43+
ipc-channel = "0.19.0"
44+
serde = { version = "1.0.219", features = ["derive"] }
45+
46+
[target.'cfg(all(unix, any(target_arch = "x86", target_arch = "x86_64")))'.dependencies]
47+
iced-x86 = "1.21.0"
4248

4349
[target.'cfg(target_family = "windows")'.dependencies]
4450
windows-sys = { version = "0.59", features = [

src/alloc_addresses/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
305305
.binary_search_by_key(&base_addr, |(addr, _)| *addr)
306306
.unwrap_err()
307307
};
308+
//eprintln!(
309+
// "Inserting into global_state at idx {pos} elems (addr {base_addr:#018x}, id {alloc_id:?})\n======"
310+
//);
308311
global_state.int_to_ptr_map.insert(pos, (base_addr, alloc_id));
309312

310313
interp_ok(base_addr)

0 commit comments

Comments
 (0)