Skip to content

Fix asan/TestCases/Darwin/scrible.cpp to work on platforms where `l… #3237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ struct Isa {
};

struct MyClass {
long padding;
// User memory and `ChunkHeader` overlap. In particular the `free_context_id`
// is stored at the beginning of user memory when it is freed. That part of
// user memory is not scribbled and is changed when the memory is freed. This
// test relies on `isa` being scribbled or unmodified after memory is freed.
// In order for this to work the start of `isa` must come after whatever is in
// `ChunkHeader` (currently the 64-bit `free_context_id`). The padding here is
// to ensure this is the case.
uint64_t padding;
Isa *isa;
long data;

Expand Down