[PATCH] D57863: [safestack] Simplify tinfo location calculation
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 14:13:32 PST 2019
vitalybuka marked an inline comment as done.
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/safestack/safestack.cc:235
void *addr = unsafe_stack_alloc(size, guard);
- struct tinfo *tinfo =
- (struct tinfo *)(((char *)addr) + size - sizeof(struct tinfo));
+ struct tinfo *tinfo = reinterpret_cast<struct tinfo *>(addr);
tinfo->start_routine = start_routine;
----------------
vlad.tsyrklevich wrote:
> Shouldn't this be addr+guard?
unsafe_stack_alloc already does that
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57863/new/
https://reviews.llvm.org/D57863
More information about the llvm-commits
mailing list