mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 10:54:07 +08:00
Fallback in libsanitizer for scudo sanitizer (PR sanitizer/87892).
2018-11-09 Martin Liska <mliska@suse.cz> PR sanitizer/87892 * sanitizer_common/sanitizer_linux_libcdep.cc (defined): Return 1 when CPU_COUNT macro is not defined. From-SVN: r265950
This commit is contained in:
parent
2e62beb05e
commit
d1e2e13c42
@ -1,3 +1,9 @@
|
||||
2018-11-09 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/87892
|
||||
* sanitizer_common/sanitizer_linux_libcdep.cc (defined): Return
|
||||
1 when CPU_COUNT macro is not defined.
|
||||
|
||||
2018-11-08 Bill Seurer <seurer@linux.vnet.ibm.com>
|
||||
|
||||
* libsanitizer/sanitizer_common/sanitizer_linux.cc (CheckASLR):
|
||||
|
@ -694,9 +694,13 @@ u32 GetNumberOfCPUs() {
|
||||
#elif SANITIZER_SOLARIS
|
||||
return sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#else
|
||||
#if defined(CPU_COUNT)
|
||||
cpu_set_t CPUs;
|
||||
CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0);
|
||||
return CPU_COUNT(&CPUs);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user