[Pkg-net-snmp-devel] Bug#418012: libsnmp9: Too noisy when parsing
counter64 on x64 system
Bin Tian
tianbin at cernet.edu.cn
Fri Apr 6 07:15:17 UTC 2007
Package: libsnmp9
Version: 5.2.3-7
Severity: normal
On AMD64 system, when parsing a counter64 variable, it will output
something like that:
truncating unsigned value to 32 bits (6)
truncating unsigned value to 32 bits (6)
truncating unsigned value to 32 bits (6)
truncating unsigned value to 32 bits (6)
truncating unsigned value to 32 bits (6)
truncating unsigned value to 32 bits (6)
On 32bit systems you couldn't see these messages. And these messages
should be suppressed.
A patch is available as following:
--- net-snmp-5.2.3/snmplib/asn1.c 2005-10-12 18:28:37.000000000 +0800
+++ net-snmp-5.2.3.new/snmplib/asn1.c 2007-04-06 14:48:00.000000000 +0800
@@ -211,22 +211,17 @@
# define CHECK_OVERFLOW_S(x,y)
# define CHECK_OVERFLOW_U(x,y)
#else
-# define CHECK_OVERFLOW_S(x,y) do { int trunc = 0; \
+# define CHECK_OVERFLOW_S(x,y) do { \
if (x > INT32_MAX) { \
- trunc = 1; \
x &= 0xffffffff; \
} else if (x < INT32_MIN) { \
- trunc = 1; \
x = 0 - (x & 0xffffffff); \
} \
- if (trunc) \
- snmp_log(LOG_ERR,"truncating signed value to 32 bits (%d)\n",y); \
} while(0)
# define CHECK_OVERFLOW_U(x,y) do { \
if (x > UINT32_MAX) { \
x &= 0xffffffff; \
- snmp_log(LOG_ERR,"truncating unsigned value to 32 bits (%d)\n",y); \
} \
} while(0)
#endif
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=zh_CN, LC_CTYPE=zh_CN (charmap=GB2312)
Versions of packages libsnmp9 depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii libsensors3 1:2.10.1-3 library to read temperature/voltag
ii libsnmp-base 5.2.3-7 NET SNMP (Simple Network Managemen
ii libssl0.9.8 0.9.8c-4 SSL shared libraries
ii libwrap0 7.6.dbs-13 Wietse Venema's TCP wrappers libra
libsnmp9 recommends no packages.
-- no debconf information
More information about the Pkg-net-snmp-devel
mailing list