Skip to content

Commit df72168

Browse files
committed
Conservatively pinning scopes inside the handler
1 parent 8f2ec4f commit df72168

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mmtk/src/scanning.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ impl Scanning<JuliaVM> for VMScanning {
123123
let mut eh = (*task).eh;
124124
loop {
125125
if !eh.is_null() {
126-
// get scope and add it as root
126+
// conservatively deal with the scope objects
127+
// FIXME: we could potentially just add them to the node_buffer
127128
let scope_address = Address::from_ptr((*eh).scope);
128-
if crate::object_model::is_addr_in_immixspace(scope_address) {
129-
let objref =
130-
ObjectReference::from_raw_address_unchecked(scope_address);
131-
node_buffer.push(objref);
129+
if let Some(obj) = is_potential_mmtk_object(scope_address) {
130+
CONSERVATIVE_ROOTS.lock().unwrap().insert(obj);
132131
}
133132

134133
// conservatively scan eh_ctx and potentially traverse the list of handlers (_jl_handler_t *prev)

0 commit comments

Comments
 (0)