[PATCH] D28609: [lsan] Enable LSan for x86 Linux.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 10:46:57 PST 2017
vitalybuka added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1185
+ CHECK_EQ(0, (uptr)child_stack % 16);
+ child_stack = (char *)child_stack - 7 * sizeof(unsigned int);
+ ((unsigned int *)child_stack)[0] = (uptr)flags;
----------------
m.ostapenko wrote:
> vitalybuka wrote:
> > Could this be more readable with
> > struct Header {
> > uptr flags;
> > uptr ???;
> > uptr fn;
> > uptr args;
> > ....
> > };
> > Header* header = stattic_cast(Header*)child_stack - 1;
> > header = {....}
> > or just
> > header.flags = flags
> > ...
> >
> Hm, this is quite low level C code (mainly copied from Glibc sources), is it worth to C++ise it? For all other architectures we don't use C++ style thus we'll probably need to update them to C++ style or just use C style for all arches in order to preserve consistency.
thanks, we should keep same way for consistency.
Repository:
rL LLVM
https://reviews.llvm.org/D28609
More information about the llvm-commits
mailing list