Skip to content

Commit

Permalink
Add an assertion for inlined data in jl_genericmemory_t
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon committed Jan 13, 2025
1 parent 0446afa commit 5705e77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"
[package.metadata.julia]
# Our CI matches the following line and extract mmtk/julia. If this line is updated, please check ci yaml files and make sure it works.
julia_repo = "https://github.com/qinsoon/julia.git"
julia_version = "c81fe48f9820bb3a6a67e155fd08b6b7fa4f2734"
julia_version = "7aa7e2451d4c668056567219ea040474e7a25b3e"

[lib]
crate-type = ["cdylib"]
Expand Down
4 changes: 4 additions & 0 deletions mmtk/src/julia_scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ pub unsafe fn scan_julia_object<SV: SlotVisitor<JuliaVMSlot>>(obj: Address, clos
println!("scan_julia_obj {}: genericmemory how = {}\n", obj, how);
}

if how == 0 {
assert!(crate::api::mmtk_is_object_pinned(ObjectReference::from_raw_address_unchecked(obj)), "Data for {} is inlined, but the object is not pinned", obj);
}

if how == 3 {
let owner_addr = mmtk_jl_genericmemory_data_owner_field_address(m);
process_slot(closure, owner_addr);
Expand Down

0 comments on commit 5705e77

Please sign in to comment.