summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-02-04 21:40:40 -0800
committerGeorge Burgess IV <gbiv@google.com>2020-02-04 21:52:36 -0800
commit2f7876596e700c85a1c7ad7ad21f3e6accb4a0bc (patch)
treeb89a9f8617a1b54c761364a8bb9c9361803c2a67 /libc/malloc_hooks/malloc_hooks.cpp
parent4fe5b783a46fced8fa355a5a9a187528eecde3cc (diff)
fortify: remove 'optimizations' for functions that LLVM knows about
Over the last year, LLVM apparently learned how to optimize many FORTIFY'ed functions. I went through the list of functions it optimizes, and simplified their implementations here. This is more than a code health thing; __bos_trivially_ge expands to a branch that's not eliminated until after inlining, so it can actually cause some functions (like one of std::string's ctors) to become uninlineable. Bug: 148189733 Test: hand-checked the IR we get for each of the changed functions. Many get optimized to their non-_chk variant when appropriate. Others will get optimized to non-_chk versions when bos == -1. Bug repro also now shows all 'inline's. Change-Id: Ic360818ad9daaeda3958e1282af41087f85122a3
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions