Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.13.0
-
None
Description
On a system with a AMD Ryzen 7 3700X 8-Core Processor, QUuid does not return unique uuid's. Given the following example code:
#include <QCoreApplication> #include <QUuid> #include <iostream> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); std::cout << QUuid::createUuid().toString().toStdString() << std::endl; std::cout << QUuid::createUuid().toString().toStdString() << std::endl; std::cout << QUuid::createUuid().toString().toStdString() << std::endl; std::cout << QUuid::createUuid().toString().toStdString() << std::endl; std::cout << QUuid::createUuid().toString().toStdString() << std::endl; std::cout << QUuid::createUuid().toString().toStdString() << std::endl; return a.exec(); }
results in:
$ ./qtcreator_test {ffffffff-ffff-4fff-bfff-ffffffffffff} {ffffffff-ffff-4fff-bfff-ffffffffffff} {ffffffff-ffff-4fff-bfff-ffffffffffff} {ffffffff-ffff-4fff-bfff-ffffffffffff} {ffffffff-ffff-4fff-bfff-ffffffffffff} {ffffffff-ffff-4fff-bfff-ffffffffffff}
CPU instruction example:
#include <stdio.h> #include <stdint.h> int rdrand64_step (uint64_t *rand) { unsigned char ok; asm volatile ("rdrand %0; setc %1" : "=r" (*rand), "=qm" (ok)); return (int) ok; } int main(void) { int tries = 10; uint64_t rv; while (tries--) { int r = rdrand64_step(&rv); printf("%d: %ld\n", r, rv); } }
results in:
$ ./rdrand 1: -1 1: -1 1: -1 1: -1 1: -1 1: -1 1: -1 1: -1 1: -1 1: -1
See also: https://github.com/systemd/systemd/issues/11810 but this issue is not related to suspending.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-22894 Cannot build project: Hangs on 'Persisting CMake state...'
- Closed
- resulted from
-
QTCREATORBUG-22812 Duplicate compilers detected
- Closed
- links to