[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-2357163 ] Crash in init_hr_swinst on Fedora10/64bit
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2008-12-01 13:42:39
Message-ID: E1L792t-0001QX-Rn () b55xhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Bugs item #2357163, was opened at 2008-11-29 00:30
Message generated for change (Settings changed) made by goeran
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: Closed
Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Gran Uddeborg (goeran)
Assigned to: Jan Safranek (jsafranek)
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. 

----------------------------------------------------------------------

Comment By: Gran Uddeborg (goeran)
Date: 2008-12-01 14:42

Message:
Ok.

----------------------------------------------------------------------

Comment By: Jan Safranek (jsafranek)
Date: 2008-12-01 12:20

Message:
That's rpm-4.6 bug, it should be backward compatible if _RPM_4_4_COMPAT is
defined. You can track the bug at
https://bugzilla.redhat.com/show_bug.cgi?id=473420.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=2357163&group_id=12694

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic