ports/162483: python -c "import rpm" crashes with a segfault
Sean Mitchell
smitchell at hcn-inc.com
Fri Nov 11 15:40:07 UTC 2011
>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 at 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:
More information about the freebsd-ports-bugs
mailing list