You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if res asu128 >= (1u128 << layout.pointer_size.bits()){
86
+
Err(EvalError::OverflowingPointerMath)
87
+
}else{
88
+
Ok(Pointer::new(self.alloc_id, res))
89
+
}
90
+
}else{
91
+
Err(EvalError::OverflowingPointerMath)
92
+
}
77
93
}
78
94
79
95
pubfnpoints_to_zst(&self) -> bool{
@@ -108,7 +124,7 @@ pub type TlsKey = usize;
108
124
109
125
#[derive(Copy,Clone,Debug)]
110
126
pubstructTlsEntry<'tcx>{
111
-
data:Pointer,// will eventually become a map from thread IDs to pointers
127
+
data:Pointer,// Will eventually become a map from thread IDs to pointers, if we ever support more than one thread.
112
128
dtor:Option<ty::Instance<'tcx>>,
113
129
}
114
130
@@ -161,8 +177,8 @@ pub struct Memory<'a, 'tcx> {
161
177
/// A cache for basic byte allocations keyed by their contents. This is used to deduplicate
162
178
/// allocations for string and bytestring literals.
163
179
literal_alloc_cache:HashMap<Vec<u8>,AllocId>,
164
-
165
-
/// pthreads-style Thread-local storage. We only have one thread, so this is just a map from TLS keys (indices into the vector) to the pointer stored there.
180
+
181
+
/// pthreads-style thread-local storage.
166
182
thread_local:HashMap<TlsKey,TlsEntry<'tcx>>,
167
183
168
184
/// The Key to use for the next thread-local allocation.
0 commit comments