From: SourceForge.net <no...@so...> - 2008-11-30 18:50:18
|
Bugs item #2357163, was opened at 2008-11-29 00:30 Message generated for change (Settings changed) made by tanders You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=2357163&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: agent Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: Gran Uddeborg (goeran) Assigned to: Nobody/Anonymous (nobody) >Summary: Crash in init_hr_swinst on Fedora10/64bit Initial Comment: After upgrading net-snmp to 5.4.2.1, the 1.fc10 build for Fedora 10, snmpd started to crash on startup. I debugged a bit, and I believe I know the reason. The interesting part is in init_hr_swinst in hr_swinst.c. A call is made to rpmGetPath("%{_dbpath}", NULL); This call returns 0x7ffff829d180 "/var/lib/rpm" This value is assigned to swi->swi_dbpath. Single stepping the (optimised) code here I see that the swi_dbpath field changes a few steps later from 0x0 to 0xfffffffff829d180 I.e. not the value returned. But what it would have been if a 32 bit integer value had been returned, and this value had been expanded to 64 bits. Looking at the inital part of hr_swinst.c there is this code: #ifdef HAVE_RPMGETPATH #include <rpm/rpmmacro.h> #endif Obviously, the intention is to include a declaration of rpmGetPath available. But the declaration of rpmGetPath is not placed in rpmmacro.h, but in rpmfileutil.h. At least in version 4.6.0 which comes with Fedora 10. Since getRpmPath is undefined it defaults to int, and the sign-expansion makes sense. (I don't have everything which is needed to rebuild net-snmp installed, so I haven't been able to completely verify this.) For the time being, I'm using "-I -hr_swinst" as a workaround. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=2357163&group_id=12694 |