diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-09-14 20:34:32 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-09-14 20:34:32 +0000 |
commit | 26e689f0c5ddef426e03336d1a88d37bd72de1dd (patch) | |
tree | 6773a824e91634422b26a352e75dccdf143b8890 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | f5870377d94bce70a5f66377cb5a27a9798147b9 (diff) | |
download | bcm5719-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