Cherry pick libsanitizer patch (https://reviews.llvm.org/D54856).
2018-12-27 Martin Liska <mliska@suse.cz> PR sanitizer/86229 * asan/asan_errors.cc (ErrorAllocTypeMismatch::Print): Cherry pick rL350085. * asan/asan_errors.h (struct ErrorAllocTypeMismatch): Likewise. From-SVN: r267432
This commit is contained in:
parent
596883039a
commit
96051ee57b
|
@ -1,3 +1,10 @@
|
||||||
|
2018-12-27 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR sanitizer/86229
|
||||||
|
* asan/asan_errors.cc (ErrorAllocTypeMismatch::Print): Cherry
|
||||||
|
pick rL350085.
|
||||||
|
* asan/asan_errors.h (struct ErrorAllocTypeMismatch): Likewise.
|
||||||
|
|
||||||
2018-11-09 Martin Liska <mliska@suse.cz>
|
2018-11-09 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* LOCAL_PATCHES: Include one local patch.
|
* LOCAL_PATCHES: Include one local patch.
|
||||||
|
|
|
@ -123,9 +123,8 @@ void ErrorAllocTypeMismatch::Print() {
|
||||||
Decorator d;
|
Decorator d;
|
||||||
Printf("%s", d.Error());
|
Printf("%s", d.Error());
|
||||||
Report("ERROR: AddressSanitizer: %s (%s vs %s) on %p\n",
|
Report("ERROR: AddressSanitizer: %s (%s vs %s) on %p\n",
|
||||||
scariness.GetDescription(),
|
scariness.GetDescription(), alloc_names[alloc_type],
|
||||||
alloc_names[alloc_type], dealloc_names[dealloc_type],
|
dealloc_names[dealloc_type], addr_description.Address());
|
||||||
addr_description.addr);
|
|
||||||
Printf("%s", d.Default());
|
Printf("%s", d.Default());
|
||||||
CHECK_GT(dealloc_stack->size, 0);
|
CHECK_GT(dealloc_stack->size, 0);
|
||||||
scariness.Print();
|
scariness.Print();
|
||||||
|
|
|
@ -108,8 +108,8 @@ struct ErrorFreeNotMalloced : ErrorBase {
|
||||||
|
|
||||||
struct ErrorAllocTypeMismatch : ErrorBase {
|
struct ErrorAllocTypeMismatch : ErrorBase {
|
||||||
const BufferedStackTrace *dealloc_stack;
|
const BufferedStackTrace *dealloc_stack;
|
||||||
HeapAddressDescription addr_description;
|
|
||||||
AllocType alloc_type, dealloc_type;
|
AllocType alloc_type, dealloc_type;
|
||||||
|
AddressDescription addr_description;
|
||||||
|
|
||||||
ErrorAllocTypeMismatch() = default; // (*)
|
ErrorAllocTypeMismatch() = default; // (*)
|
||||||
ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr,
|
ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr,
|
||||||
|
@ -117,9 +117,8 @@ struct ErrorAllocTypeMismatch : ErrorBase {
|
||||||
: ErrorBase(tid, 10, "alloc-dealloc-mismatch"),
|
: ErrorBase(tid, 10, "alloc-dealloc-mismatch"),
|
||||||
dealloc_stack(stack),
|
dealloc_stack(stack),
|
||||||
alloc_type(alloc_type_),
|
alloc_type(alloc_type_),
|
||||||
dealloc_type(dealloc_type_) {
|
dealloc_type(dealloc_type_),
|
||||||
GetHeapAddressInformation(addr, 1, &addr_description);
|
addr_description(addr, 1, false) {}
|
||||||
};
|
|
||||||
void Print();
|
void Print();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue