[PATCH] D109409: Fix `asan/TestCases/Darwin/scrible.cpp` to work on platforms where `long` is not 64-bits.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 09:53:31 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG71841146b622: Fix `asan/TestCases/Darwin/scrible.cpp` to work on platforms where `long` is… (authored by delcypher).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109409/new/
https://reviews.llvm.org/D109409
Files:
compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
Index: compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
===================================================================
--- compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
+++ compiler-rt/test/asan/TestCases/Darwin/scribble.cpp
@@ -13,7 +13,14 @@
};
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109409.371378.patch
Type: text/x-patch
Size: 868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210908/bd7571cb/attachment.bin>
More information about the llvm-commits
mailing list