[PATCH] D37853: [scudo] Fix bad request handling when allocator has not been initialized
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 11:37:19 PDT 2017
cryptoad added a comment.
In https://reviews.llvm.org/D37853#870912, @alekseyshl wrote:
> Would moving SetAllocatorMayReturnNull call earler in the init() function help to resolve the problem?
Unfortunately, prior to this change, `init` might not be called at all. This would be the case for the following pseudo-example:
int main(void) {
void *p = memalign(3, 3);
return 0;
}
We would go directly to `ScudoAllocator::FailureHandler::OnBadRequest` without going through `initThread` -> `initScudo` -> `initFlags`.
https://reviews.llvm.org/D37853
More information about the llvm-commits
mailing list