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

Side by Side Diff: syzygy/agent/asan/heap_checker.h

Issue 2379023002: [SyzyAsan] Fix overflow error in ShadowWalker for 4GB 32-bit processes. (Closed)
Patch Set: Fix comments. Created 4 years, 2 months 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 | « no previous file | syzygy/agent/asan/heap_checker.cc » ('j') | syzygy/agent/asan/shadow.cc » ('J')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // ranges. 46 // ranges.
47 // @returns true if the heap is corrupt, false otherwise. 47 // @returns true if the heap is corrupt, false otherwise.
48 bool IsHeapCorrupt(CorruptRangesVector* corrupt_ranges); 48 bool IsHeapCorrupt(CorruptRangesVector* corrupt_ranges);
49 49
50 // TODO(sebmarchand): Add a testing seam that controls the range of memory 50 // TODO(sebmarchand): Add a testing seam that controls the range of memory
51 // that is walked by HeapChecker to keep unittest times to something 51 // that is walked by HeapChecker to keep unittest times to something
52 // reasonable. 52 // reasonable.
53 53
54 private: 54 private:
55 // Get the information about the corrupt ranges in a heap slab. 55 // Get the information about the corrupt ranges in a heap slab.
56 // @param lower_bound The lower bound for this slab. 56 // @param lower_bound The lower bound for this slab (inclusive).
57 // @param length The length of this slab. 57 // @param upper_bound The upper bound for this slab (exclusive). An
58 // overflowed value of 0 indicates the end of all memory.
58 // @param corrupt_ranges Will receive the information about the corrupt ranges 59 // @param corrupt_ranges Will receive the information about the corrupt ranges
59 // in this slab. 60 // in this slab.
60 void GetCorruptRangesInSlab(const uint8_t* lower_bound, 61 void GetCorruptRangesInSlab(const uint8_t* lower_bound,
61 size_t length, 62 const uint8_t* upper_bound,
62 CorruptRangesVector* corrupt_ranges); 63 CorruptRangesVector* corrupt_ranges);
63 64
64 // The shadow memory that will be analyzed. 65 // The shadow memory that will be analyzed.
65 Shadow* shadow_; 66 Shadow* shadow_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(HeapChecker); 68 DISALLOW_COPY_AND_ASSIGN(HeapChecker);
68 }; 69 };
69 70
70 } // namespace asan 71 } // namespace asan
71 } // namespace agent 72 } // namespace agent
72 73
73 #endif // SYZYGY_AGENT_ASAN_HEAP_CHECKER_H_ 74 #endif // SYZYGY_AGENT_ASAN_HEAP_CHECKER_H_
OLDNEW
« no previous file with comments | « no previous file | syzygy/agent/asan/heap_checker.cc » ('j') | syzygy/agent/asan/shadow.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698