| OLD | NEW |
| 1 // Copyright 2013 Google Inc. All Rights Reserved. | 1 // Copyright 2013 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 bool FakeAsanBlock::InitializeBlock(uint32_t alloc_size) { | 314 bool FakeAsanBlock::InitializeBlock(uint32_t alloc_size) { |
| 315 BlockLayout layout = {}; | 315 BlockLayout layout = {}; |
| 316 EXPECT_TRUE(BlockPlanLayout(alloc_alignment, | 316 EXPECT_TRUE(BlockPlanLayout(alloc_alignment, |
| 317 alloc_alignment, | 317 alloc_alignment, |
| 318 alloc_size, | 318 alloc_size, |
| 319 0, | 319 0, |
| 320 0, | 320 0, |
| 321 &layout)); | 321 &layout)); |
| 322 | 322 |
| 323 // Initialize the Asan block. | 323 // Initialize the Asan block. |
| 324 BlockInitialize(layout, buffer_align_begin, false, &block_info); | 324 BlockInitialize(layout, buffer_align_begin, &block_info); |
| 325 EXPECT_NE(reinterpret_cast<void*>(NULL), block_info.body); | 325 EXPECT_NE(reinterpret_cast<void*>(NULL), block_info.body); |
| 326 | 326 |
| 327 StackCapture stack; | 327 StackCapture stack; |
| 328 stack.InitFromStack(); | 328 stack.InitFromStack(); |
| 329 block_info.header->alloc_stack = stack_cache->SaveStackTrace(stack); | 329 block_info.header->alloc_stack = stack_cache->SaveStackTrace(stack); |
| 330 | 330 |
| 331 shadow_->PoisonAllocatedBlock(block_info); | 331 shadow_->PoisonAllocatedBlock(block_info); |
| 332 BlockSetChecksum(block_info); | 332 BlockSetChecksum(block_info); |
| 333 | 333 |
| 334 // Calculate the size of the zone of the buffer that we use to ensure that | 334 // Calculate the size of the zone of the buffer that we use to ensure that |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 | 1210 |
| 1211 // Delete the entire range. | 1211 // Delete the entire range. |
| 1212 shadow_address_space_.Remove(iter_pair); | 1212 shadow_address_space_.Remove(iter_pair); |
| 1213 if (reinsert_head_range) | 1213 if (reinsert_head_range) |
| 1214 CHECK(shadow_address_space_.Insert(head_range, head_data)); | 1214 CHECK(shadow_address_space_.Insert(head_range, head_data)); |
| 1215 if (reinsert_tail_range) | 1215 if (reinsert_tail_range) |
| 1216 CHECK(shadow_address_space_.Insert(tail_range, tail_data)); | 1216 CHECK(shadow_address_space_.Insert(tail_range, tail_data)); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 } // namespace testing | 1219 } // namespace testing |
| OLD | NEW |