Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Nov 2011 15:37:33 GMT
From:      Sean Mitchell <smitchell@hcn-inc.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/162483: python -c "import rpm" crashes with a segfault
Message-ID:  <201111111537.pABFbXFi062203@red.freebsd.org>
Resent-Message-ID: <201111111540.pABFe6jC008545@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         162483
>Category:       ports
>Synopsis:       python -c "import rpm" crashes with a segfault
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 11 15:40:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Sean Mitchell
>Release:        Production 8.2
>Organization:
HCN
>Environment:
FreeBSD .hq.hcn 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
With the rpm4 port (rpm-4.9.1.2), import the rpm module in python causes a segfault.

The cause of the segfault is dereferencing glob_t.gl_pathv at line 629 in rpm-4.9.1.2/rpmio/rpmfileutil.c.

The reason for the gl_pathv is set to an invalid pointer is because rpm is using the header file rpm-4.9.1.2/misc/glob.h which defines a different glob_t structure then the one found in /usr/include/glob.h.  As the glob function linked to is the one in libc.a and not misc/glob.c, resulting in dereferencing the wrong address.


>How-To-Repeat:
install rpm4 port.  run python -c "import rpm"
>Fix:
Replace the definition of the glob_t struct in misc/glob.h with the definition found in /usr/include/glob.h

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111111537.pABFbXFi062203>