svn commit: r462617 - in head/devel/hwloc: . files

Tijl Coosemans tijl at FreeBSD.org
Thu Feb 22 18:02:02 UTC 2018


Author: tijl
Date: Thu Feb 22 18:02:01 2018
New Revision: 462617
URL: https://svnweb.freebsd.org/changeset/ports/462617

Log:
  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

Added:
  head/devel/hwloc/files/
  head/devel/hwloc/files/patch-src_topology-x86.c   (contents, props changed)
Modified:
  head/devel/hwloc/Makefile

Modified: head/devel/hwloc/Makefile
==============================================================================
--- head/devel/hwloc/Makefile	Thu Feb 22 17:44:36 2018	(r462616)
+++ head/devel/hwloc/Makefile	Thu Feb 22 18:02:01 2018	(r462617)
@@ -2,7 +2,7 @@
 
 PORTNAME=	hwloc
 PORTVERSION=	1.11.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	http://www.open-mpi.org/software/hwloc/v${PORTVERSION:R}/downloads/ \
 		http://icl.cs.utk.edu/open-mpi/software/hwloc/v${PORTVERSION:R}/downloads/
@@ -23,8 +23,6 @@ CONFIGURE_ARGS=	--enable-static \
 		--disable-gl
 INSTALL_TARGET=	install-strip
 USES=		iconv libtool pathfix pkgconfig tar:bzip2
-# Builds fine with clang, but crashes since 1.11.3
-USE_GCC=	any
 USE_LDCONFIG=	yes
 USE_GNOME=	libxml2
 

Added: head/devel/hwloc/files/patch-src_topology-x86.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/hwloc/files/patch-src_topology-x86.c	Thu Feb 22 18:02:01 2018	(r462617)
@@ -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;


More information about the svn-ports-head mailing list