mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 01:55:08 +00:00
[MSan] [PowerPC] Dereference function descriptors when recording stack origins.
Differential Revision: http://reviews.llvm.org/D19543 llvm-svn: 267795
This commit is contained in:
parent
66f0deacb5
commit
0bec2fef8e
@ -538,6 +538,13 @@ void __msan_set_alloca_origin4(void *a, uptr size, char *descr, uptr pc) {
|
||||
u32 idx = atomic_fetch_add(&NumStackOriginDescrs, 1, memory_order_relaxed);
|
||||
CHECK_LT(idx, kNumStackOriginDescrs);
|
||||
StackOriginDescr[idx] = descr + 4;
|
||||
#if SANITIZER_PPC64V1
|
||||
// On PowerPC64 ELFv1, the address of a function actually points to a
|
||||
// three-doubleword data structure with the first field containing
|
||||
// the address of the function's code.
|
||||
if (pc)
|
||||
pc = *reinterpret_cast<uptr*>(pc);
|
||||
#endif
|
||||
StackOriginPC[idx] = pc;
|
||||
id = Origin::CreateStackOrigin(idx).raw_id();
|
||||
*id_ptr = id;
|
||||
|
Loading…
Reference in New Issue
Block a user