forked from OSchip/llvm-project
[asan] remove a fixed FIXME; extend the comment around __sanitizer_annotate_contiguous_container
llvm-svn: 195131
This commit is contained in:
parent
bfb2016c83
commit
3771a3dd73
|
@ -70,7 +70,16 @@ extern "C" {
|
|||
//
|
||||
// Use with caution and don't use for anything other than vector-like classes.
|
||||
//
|
||||
// For AddressSanitizer, 'beg' should be 8-aligned.
|
||||
// For AddressSanitizer, 'beg' should be 8-aligned and 'end' should
|
||||
// be either 8-aligned or it should point to the end of a separate heap-,
|
||||
// stack-, or global- allocated buffer. I.e. the following will not work:
|
||||
// int64_t x[2]; // 16 bytes, 8-aligned.
|
||||
// char *beg = (char *)&x[0];
|
||||
// char *end = beg + 12; // Not 8 aligned, not the end of the buffer.
|
||||
// This however will work fine:
|
||||
// int32_t x[3]; // 12 bytes, but 8-aligned under AddressSanitizer.
|
||||
// char *beg = (char*)&x[0];
|
||||
// char *end = beg + 12; // Not 8-aligned, but is the end of the buffer.
|
||||
void __sanitizer_annotate_contiguous_container(const void *beg,
|
||||
const void *end,
|
||||
const void *old_mid,
|
||||
|
|
|
@ -292,7 +292,6 @@ void __sanitizer_annotate_contiguous_container(const void *beg_p,
|
|||
uptr b2 = RoundUpTo(new_mid, granularity);
|
||||
// New state:
|
||||
// [a, b1) is good, [b2, c) is bad, [b1, b2) is partially good.
|
||||
// FIXME: we may want to have a separate poison magic value.
|
||||
PoisonShadow(a, b1 - a, 0);
|
||||
PoisonShadow(b2, c - b2, kAsanContiguousContainerOOBMagic);
|
||||
if (b1 != b2) {
|
||||
|
|
Loading…
Reference in New Issue