Bionic doesn't initialize its globals early enough. This causes issues when
trying to access them from a preinit_array (b/25751302) or from another
constructor called before the libc one (b/68046352). __progname is initialized
after the other globals, so we can check its value to know if calling
getauxval is safe.
Details
Diff Detail
- Build Status
Buildable 12498 Build 12498: arc lint + arc unit
Event Timeline
lib/scudo/scudo_utils.cpp | ||
---|---|---|
110 | 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)? |
lib/scudo/scudo_utils.cpp | ||
---|---|---|
110 | I'll see what I can whip out regarding the 2nd part of the comment. A few other words for the record: |
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)?