]> git.ipfire.org Git - thirdparty/gcc.git/commit
libphobos: Fix regression d21 loops in getCpuInfo0B in Solaris/x86 kernel zone
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 7 Nov 2023 13:04:07 +0000 (14:04 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 7 Nov 2023 13:05:05 +0000 (14:05 +0100)
commit0b25c1295d4e84af681f4b1f4af2ad37cd270da3
tree4d779af033685f1026a9a016e1c699b32f512030
parent47e40beb680d0195a154a818ab675cf018d8def9
libphobos: Fix regression d21 loops in getCpuInfo0B in Solaris/x86 kernel zone

This function assumes that cpuid would return "invalid domain" when a
sub-leaf index greater than what's supported is requested.  This turned
out not to always be the case when running on some virtual machines.

As the loop only does anything for levels 0 and 1, make that a hard
limit for number of times the loop is ran.

    PR d/112408

libphobos/ChangeLog:

* libdruntime/core/cpuid.d (getCpuInfo0B): Limit number of times loop
runs.
libphobos/libdruntime/core/cpuid.d