[PATCH] D28609: [lsan] Enable LSan for x86 Linux.
Maxim Ostapenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 01:03:03 PST 2017
m.ostapenko 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;
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D28609
More information about the llvm-commits
mailing list