File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -153,15 +153,11 @@ impl<'mir, 'tcx> GlobalStateInner {
153
153
}
154
154
155
155
fn alloc_base_addr ( ecx : & MiriEvalContext < ' mir , ' tcx > , alloc_id : AllocId ) -> u64 {
156
- // TODO avoid hole punch
157
- // TODO avoid bytes hole punch
158
156
// TODO avoid leaked address hack
159
- let base_addr: u64 = match ecx. get_alloc_raw ( alloc_id) {
160
- Ok ( ref alloc) => {
161
- let temp = alloc. get_bytes_addr ( ) ;
162
- // TODO make this a check
163
- assert ! ( temp. bytes( ) % 16 == 0 ) ;
164
- temp. bytes ( )
157
+ let base_addr: u64 = match ecx. get_alloc_base_addr ( alloc_id) {
158
+ Ok ( addr) => {
159
+ assert ! ( addr. bytes( ) % 16 == 0 ) ;
160
+ addr. bytes ( )
165
161
}
166
162
// Grabbing u128 for max alignment
167
163
Err ( _) => Box :: leak ( Box :: new ( 0u128 ) ) as * const u128 as u64 ,
You can’t perform that action at this time.
0 commit comments