summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2017-09-14 20:34:32 +0000
committerKostya Kortchinsky <kostyak@google.com>2017-09-14 20:34:32 +0000
commit26e689f0c5ddef426e03336d1a88d37bd72de1dd (patch)
tree6773a824e91634422b26a352e75dccdf143b8890 /llvm/lib/CodeGen/MachineInstr.cpp
parentf5870377d94bce70a5f66377cb5a27a9798147b9 (diff)
downloadbcm5719-llvm-26e689f0c5ddef426e03336d1a88d37bd72de1dd.tar.gz
bcm5719-llvm-26e689f0c5ddef426e03336d1a88d37bd72de1dd.zip
[scudo] Fix bad request handling when allocator has not been initialized
Summary: In a few functions (`scudoMemalign` and the like), we would call `ScudoAllocator::FailureHandler::OnBadRequest` if the parameters didn't check out. The issue is that if the allocator had not been initialized (eg: if this is the first heap related function called), we would use variables like `allocator_may_return_null` and `exitcode` that still had their default value (as opposed to the one set by the user or the initialization path). To solve this, we introduce `handleBadRequest` that will call `initThreadMaybe`, allowing the options to be correctly initialized. Unfortunately, the tests were passing because `exitcode` was still 0, so the results looked like success. Change those tests to do what they were supposed to. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37853 llvm-svn: 313294
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud