aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2016-02-11 18:07:17 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2016-02-11 18:07:17 +0000
commit027729c56688a0a5d8eab8ad81d46fc0304dd16a (patch)
tree7b5dabbd7d1ff3b7374e93d69af3c49397697093 /llvm/lib/CodeGen/MachineInstr.cpp
parent37a09a8428f895161fe8e11001d319ca199582e1 (diff)
downloadllvm-027729c56688a0a5d8eab8ad81d46fc0304dd16a.zip
llvm-027729c56688a0a5d8eab8ad81d46fc0304dd16a.tar.gz
llvm-027729c56688a0a5d8eab8ad81d46fc0304dd16a.tar.bz2
[LSan] Fix a crash when LSan hits a guard page while scanning thread stack for pointers.
Summary: In some cases stack pointer register (SP) doesn't point into the thread stack: e.g. if one is using swapcontext(). In this case LSan conservatively tries to scan the whole thread stack for pointers. However, thread stack (at least in glibc implementation) may also include guard pages, causing LSan to crash when it's reading from them. One of the solutions is to use a pthread_attr_getguardsize() to adjust the calculated stack boundaries. However, here we're just using IsAccessibleMemoryRange to skip guard pages and make the code (slightly) less platform-specific. Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17116 llvm-svn: 260554
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions