Skip to content

Commit

Permalink
Use the correct logic for CPUID faulting check skipping
Browse files Browse the repository at this point in the history
We're supposed to run this check only on x86_64/i386, but the current logic
is running the check on all architectures _except_ x86_64/i386. Oops.

```
(gdb) disassemble cpuid_faulting_works
Dump of assembler code for function _ZN2rr20cpuid_faulting_worksEv:
   0x00000000005d3a60 <+0>:     xor    %eax,%eax
   0x00000000005d3a62 <+2>:     ret
End of assembler dump.
```
  • Loading branch information
KJTsanaktsidis authored and rocallahan committed Oct 18, 2024
1 parent de6a8eb commit 536ade5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ bool cpuid_faulting_works() {
static bool did_check_cpuid_faulting = false;
static bool cpuid_faulting_ok = false;

#if defined(__i386__) || defined(__x86_64__)
#if !(defined(__i386__) || defined(__x86_64__))
did_check_cpuid_faulting = true;
#endif
if (did_check_cpuid_faulting) {
Expand Down

0 comments on commit 536ade5

Please sign in to comment.