We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 52df6ad + 21ce042 commit d758d3cCopy full SHA for d758d3c
compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
@@ -13,7 +13,14 @@ struct Isa {
13
};
14
15
struct MyClass {
16
- long padding;
+ // User memory and `ChunkHeader` overlap. In particular the `free_context_id`
17
+ // is stored at the beginning of user memory when it is freed. That part of
18
+ // user memory is not scribbled and is changed when the memory is freed. This
19
+ // test relies on `isa` being scribbled or unmodified after memory is freed.
20
+ // In order for this to work the start of `isa` must come after whatever is in
21
+ // `ChunkHeader` (currently the 64-bit `free_context_id`). The padding here is
22
+ // to ensure this is the case.
23
+ uint64_t padding;
24
Isa *isa;
25
long data;
26
0 commit comments