[PATCH] D40504: [scudo] Workaround for uninitialized Bionic globals
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 11:22:55 PST 2017
alekseyshl accepted this revision.
alekseyshl added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/scudo/scudo_utils.cpp:110
bool hasHardwareCRC32() {
- if (&getauxval)
+ if (&getauxval && areBionicGlobalsInitialized())
return !!(getauxval(AT_HWCAP) & HWCAP_CRC32);
----------------
So, hasHardwareCRC32ARMPosix() works fine, even that not all globals are initialized? Maybe the proper way is to repeat the check after globals are initialized (a lot more hassle, I know)?
https://reviews.llvm.org/D40504
More information about the llvm-commits
mailing list