pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/net-snmp net-snmp: Prevent crash on NetBSD/i386
details: https://anonhg.NetBSD.org/pkgsrc/rev/d06b582db8a7
branches: trunk
changeset: 369819:d06b582db8a7
user: gavan <gavan%pkgsrc.org@localhost>
date: Fri Oct 06 02:39:38 2017 +0000
description:
net-snmp: Prevent crash on NetBSD/i386
A compiler bug causes incorrect compilation of the NetBSD-specific
code in cpu_sysctl.c. This results in a crash shortly after startup if
the machine has 2 or more CPUs.
Disable optimisation in netsnmp_cpu_arch_load() only.
This works around the problem reported in PR pkg/50939.
diffstat:
net/net-snmp/Makefile | 4 +-
net/net-snmp/distinfo | 4 +-
net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c | 11 +++++++++-
3 files changed, 14 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r 52ad3fa853c5 -r d06b582db8a7 net/net-snmp/Makefile
--- a/net/net-snmp/Makefile Thu Oct 05 22:50:30 2017 +0000
+++ b/net/net-snmp/Makefile Fri Oct 06 02:39:38 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.120 2017/07/23 17:43:33 adam Exp $
+# $NetBSD: Makefile,v 1.121 2017/10/06 02:39:38 gavan Exp $
.include "Makefile.common"
CATEGORIES= net
-PKGREVISION= 7
+PKGREVISION= 8
MAINTAINER= adam%NetBSD.org@localhost
COMMENT= Extensible SNMP implementation
diff -r 52ad3fa853c5 -r d06b582db8a7 net/net-snmp/distinfo
--- a/net/net-snmp/distinfo Thu Oct 05 22:50:30 2017 +0000
+++ b/net/net-snmp/distinfo Fri Oct 06 02:39:38 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.90 2017/02/09 09:33:57 maya Exp $
+$NetBSD: distinfo,v 1.91 2017/10/06 02:39:38 gavan Exp $
SHA1 (net-snmp-5.7.3.tar.gz) = 97dc25077257680815de44e34128d365c76bd839
RMD160 (net-snmp-5.7.3.tar.gz) = c5cf54d5723ee417e07f1f9fa3936aef505104a2
@@ -10,7 +10,7 @@
SHA1 (patch-agent_mibgroup_agentx_master.c) = c2b3f145280e3fecc26a431ec914cf89d87a17f4
SHA1 (patch-agent_mibgroup_agentx_master_admin.c) = 3c233c1e3113fbc9c1de34cb4cbacca9ef4a6fe2
SHA1 (patch-agent_mibgroup_at.c) = 50842f54d98b3cf7bf7028ddbb582b84b7ae682f
-SHA1 (patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c) = 5f1cd89f938b60e57ae87c055a269d3848b6a23e
+SHA1 (patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c) = d36d2490448c2dfda0383c67deb36fdb31ff18a3
SHA1 (patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c) = cee9722d9a3f956726a8760b900ed3a375afde3f
SHA1 (patch-agent_mibgroup_hardware_memory_memory__netbsd.c) = 928a5aa99e7893ee91dea3110db8098212e328fa
SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = f983ae0d99d85ab1ac6dc7cf2d2c0415b6935258
diff -r 52ad3fa853c5 -r d06b582db8a7 net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
--- a/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c Thu Oct 05 22:50:30 2017 +0000
+++ b/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c Fri Oct 06 02:39:38 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c,v 1.6 2014/12/31 10:06:57 adam Exp $
+$NetBSD: patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c,v 1.7 2017/10/06 02:39:38 gavan Exp $
--- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2014-12-08 20:23:22.000000000 +0000
+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c
@@ -51,6 +51,15 @@
#endif
for ( i = 0; i < n; i++ ) {
cpu = netsnmp_cpu_get_byIdx( i, 1 );
+@@ -158,7 +165,7 @@
+ /*
+ * Load the latest CPU usage statistics
+ */
+-int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
++int __attribute__((optimize("O0"))) netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
+
+ /*
+ * Strictly speaking, BSDi ought to use
@@ -190,9 +197,11 @@ int netsnmp_cpu_arch_load( netsnmp_cache
netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 );
Home |
Main Index |
Thread Index |
Old Index