diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2018-02-22 18:02:01 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2018-02-22 18:02:01 +0000 |
commit | d225dfaeabd434e41ee70cd7dc8eecf07aa1bb96 (patch) | |
tree | 865174f83095d5f20144c5c9fb15ba26edd14ccc /devel/hwloc/files/patch-src_topology-x86.c | |
parent | x11-toolkits/py-xlib: Update to 0.21 (diff) |
Add a patch to work around a buffer overrun in cpuset_getid in FreeBSD 11.1.
This caused a crash when compiled with Clang due to a different stack
layout compared to GCC.
PR: 225229
See also: https://github.com/open-mpi/hwloc/issues/282
Notes
Notes:
svn path=/head/; revision=462617
Diffstat (limited to 'devel/hwloc/files/patch-src_topology-x86.c')
-rw-r--r-- | devel/hwloc/files/patch-src_topology-x86.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/devel/hwloc/files/patch-src_topology-x86.c b/devel/hwloc/files/patch-src_topology-x86.c new file mode 100644 index 000000000000..cd586b456de2 --- /dev/null +++ b/devel/hwloc/files/patch-src_topology-x86.c @@ -0,0 +1,17 @@ +--- src/topology-x86.c.orig 2017-04-19 15:19:38 UTC ++++ src/topology-x86.c +@@ -997,7 +997,14 @@ int hwloc_look_x86(struct hwloc_backend *backend, int + unsigned features[10] = { 0 }; + struct procinfo *infos = NULL; + enum cpuid_type cpuid_type = unknown; ++#if defined HWLOC_FREEBSD_SYS && defined HAVE_CPUSET_SETID \ ++ && __FreeBSD_version >= 1101000 && __FreeBSD_version < 1102000 ++ /* Buffer overrun in cpuset_getid in FreeBSD 11.1 */ ++ hwloc_x86_os_state_t os_state[2]; ++#define os_state os_state[0] ++#else + hwloc_x86_os_state_t os_state; ++#endif + struct hwloc_binding_hooks hooks; + struct hwloc_topology_support support; + struct hwloc_topology_membind_support memsupport __hwloc_attribute_unused; |