Found when investigating
QTBUG-77113, where the application freezes on startup on a x86_64 emulator for Android.
It looks like
1. qDetectCpuFeatures() calls qFatal(),
2. This which will initialize a default logging category and register it to a hash in a global registry.
3. QHash will salt the hash with a random number.
4. This number is generated by the QRandomGenerator, which will call qDetectCpuFeatures().
5. On the second call, it will hang on the guard for the global static QLoggingCategory
Here is a full stack trace of the recursion and freeze:
|For Gerrit Dashboard: QTBUG-78007|
|272601,2||qFatal: make it so you cannot disable the message||5.12||qt/qtbase||Status: MERGED||+2||0|
|272629,1||Fix deadlock caused by qsimd.cpp using qFatal, which recursed back||5.13||qt/qtbase||Status: ABANDONED||-1||0|