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

Side by Side Diff: syzygy/agent/asan/heap_checker.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/error_info_unittest.cc ('k') | syzygy/agent/asan/heap_checker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 Google Inc. All Rights Reserved. 1 // Copyright 2014 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void HeapChecker::GetCorruptRangesInSlab(const uint8_t* lower_bound, 51 void HeapChecker::GetCorruptRangesInSlab(const uint8_t* lower_bound,
52 const uint8_t* upper_bound, 52 const uint8_t* upper_bound,
53 CorruptRangesVector* corrupt_ranges) { 53 CorruptRangesVector* corrupt_ranges) {
54 DCHECK_NE(static_cast<const uint8_t*>(nullptr), lower_bound); 54 DCHECK_NE(static_cast<const uint8_t*>(nullptr), lower_bound);
55 DCHECK(upper_bound == nullptr || lower_bound <= upper_bound); 55 DCHECK(upper_bound == nullptr || lower_bound <= upper_bound);
56 DCHECK_NE(static_cast<CorruptRangesVector*>(nullptr), corrupt_ranges); 56 DCHECK_NE(static_cast<CorruptRangesVector*>(nullptr), corrupt_ranges);
57 57
58 // An overflowed |upper_bound| is handled correctly by the ShadowWalker. 58 // An overflowed |upper_bound| is handled correctly by the ShadowWalker.
59 ShadowWalker shadow_walker( 59 ShadowWalker shadow_walker(shadow_, lower_bound, upper_bound);
60 shadow_, false, lower_bound, upper_bound);
61 60
62 AsanCorruptBlockRange* current_corrupt_range = nullptr; 61 AsanCorruptBlockRange* current_corrupt_range = nullptr;
63 62
64 // Iterates over the blocks. 63 // Iterates over the blocks.
65 BlockInfo block_info = {}; 64 BlockInfo block_info = {};
66 while (shadow_walker.Next(&block_info)) { 65 while (shadow_walker.Next(&block_info)) {
67 // Remove the protections on this block so its checksum can be safely 66 // Remove the protections on this block so its checksum can be safely
68 // validated. We leave the protections permanently removed so that the 67 // validated. We leave the protections permanently removed so that the
69 // minidump generation has free access to block contents. 68 // minidump generation has free access to block contents.
70 BlockProtectNone(block_info, shadow_); 69 BlockProtectNone(block_info, shadow_);
(...skipping 25 matching lines...) Expand all
96 block_info.RawHeader() + block_info.block_size; 95 block_info.RawHeader() + block_info.block_size;
97 current_corrupt_range->length = 96 current_corrupt_range->length =
98 current_block_end - 97 current_block_end -
99 reinterpret_cast<const uint8_t*>(current_corrupt_range->address); 98 reinterpret_cast<const uint8_t*>(current_corrupt_range->address);
100 } 99 }
101 } 100 }
102 } 101 }
103 102
104 } // namespace asan 103 } // namespace asan
105 } // namespace agent 104 } // namespace agent
OLDNEW
« no previous file with comments | « syzygy/agent/asan/error_info_unittest.cc ('k') | syzygy/agent/asan/heap_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698