File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ lazy_static = "1.1"
20
20
# - change branch
21
21
# - change repo name
22
22
# But other changes including adding/removing whitespaces in commented lines may break the CI.
23
- mmtk = { git = " https://github.com/mmtk/mmtk-core.git" , rev = " 4851e7ac7e8a7bd70ce65935c4ac1ff430cab6f1 " }
23
+ mmtk = { git = " https://github.com/mmtk/mmtk-core.git" , rev = " 4ebb6b68f54a55bf8794ea01db3f2d0f28d15f4d " }
24
24
# Uncomment the following to build locally
25
25
# mmtk = { path = "../repos/mmtk-core" }
26
26
Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ pub extern "C" fn will_never_move(object: ObjectReference) -> bool {
120
120
// We trust the worker pointer is valid.
121
121
#[ allow( clippy:: not_unsafe_ptr_arg_deref) ]
122
122
pub extern "C" fn start_worker ( tls : VMWorkerThread , worker : * mut GCWorker < OpenJDK > ) {
123
- memory_manager:: start_worker :: < OpenJDK > ( tls, unsafe { worker. as_mut ( ) . unwrap ( ) } , & SINGLETON )
123
+ let mut worker = unsafe { Box :: from_raw ( worker) } ;
124
+ memory_manager:: start_worker :: < OpenJDK > ( tls, & mut worker, & SINGLETON )
124
125
}
125
126
126
127
#[ no_mangle]
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ impl Collection<OpenJDK> for VMCollection {
49
49
}
50
50
}
51
51
52
- fn spawn_worker_thread ( tls : VMThread , ctx : Option < & GCWorker < OpenJDK > > ) {
52
+ fn spawn_worker_thread ( tls : VMThread , ctx : Option < Box < GCWorker < OpenJDK > > > ) {
53
53
let ctx_ptr = if let Some ( r) = ctx {
54
- r as * const GCWorker < OpenJDK > as * mut GCWorker < OpenJDK >
54
+ Box :: into_raw ( r )
55
55
} else {
56
56
std:: ptr:: null_mut ( )
57
57
} ;
You can’t perform that action at this time.
0 commit comments