Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: syzygy/agent/asan/unittest_util.cc

Issue 2508333002: Remove the is_nested bit from the BlockInfo structure. (Closed)
Patch Set: Address Siggi's comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « syzygy/agent/asan/shadow_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « syzygy/agent/asan/shadow_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698