Bug 384421

Summary: pkg-config segfaults on .pc files with Conflicts:
Product: [Fedora] Fedora Reporter: Stu Tomlinson <stu>
Component: pkgconfigAssignee: Matthias Clasen <mclasen>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 0.21-6.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-19 03:17:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stu Tomlinson 2007-11-15 11:51:37 UTC
Description of problem:
pkg-config --cflags <package> segfaults if <package>.pc contains a Conflicts: line.

Version-Release number of selected component (if applicable):
pkgconfig-0.21-5.fc7

How reproducible:
easily reproducible on F7 & F8

Steps to Reproduce:
1. yum install libsilc-devel
2. pkg-config --cflags silc

  
Actual results:
$ pkg-config --cflags silc
Segmentation fault


Expected results:
$ pkg-config --cflags silc
-I/usr/include/silc  


Additional info:
Backtrace with pkgconfig-debuginfo installed:

(gdb) run --cflags silc
Starting program: /usr/bin/pkg-config --cflags silc

Program received signal SIGSEGV, Segmentation fault.
g_slist_copy (list=0xb) at gslist.c:333
333           new_list->data = list->data;
(gdb) info locals
last = <value optimized out>
new_list = (GSList *) 0x832f110
(gdb) bt full
#0  g_slist_copy (list=0xb) at gslist.c:333
        last = <value optimized out>
        new_list = (GSList *) 0x832f110
#1  0x080497b6 in fill_one_level (pkg=<value optimized out>, func=<value
optimized out>, listp=0xbf82fa74) at pkg.c:608
        copy = <value optimized out>
#2  0x080497e4 in recursive_fill_list (pkg=0x832f110, func=0x832f0a0, listp=0x0)
at pkg.c:618
        tmp = <value optimized out>
#3  0x080497fb in recursive_fill_list (pkg=<value optimized out>, func=0x8049240
<get_conflicts>, listp=0xbf82fa74) at pkg.c:624
        tmp = (GSList *) 0x832f0e0
#4  0x0804a7e1 in internal_get_package (name=0x8330f60 "silc", warn=1,
check_compat=1) at pkg.c:824
        pkg = (Package *) 0x8331f00
        location = <value optimized out>
        __PRETTY_FUNCTION__ = "internal_get_package"
#5  0x0804dab0 in main (argc=Cannot access memory at address 0x0
) at main.c:484
        req = (Package *) 0x832f9b0
        ver = (RequiredVersion *) 0x832fb18
        failed = 0
        reqs = <value optimized out>
        iter = (GSList *) 0x832f0d8
        want_my_version = 0
        want_version = 0
        want_libs = 0
        want_cflags = 1
        want_l_libs = 0
        want_L_libs = 0
        want_other_libs = 0
        want_I_cflags = 0
        want_other_cflags = 0
        want_list = 0
        want_static_lib_list = 0
        want_short_errors = 0
        result = <value optimized out>
        want_uninstalled = 0
        variable_name = 0x0
        want_exists = 0
        want_prov = 0
        want_req = 0
        required_atleast_version = 0x0
        required_exact_version = 0x0
        required_max_version = 0x0
        required_pkgconfig_version = 0x0
        want_silence_errors = 0
        str = (GString *) 0x8331568
        packages = (GSList *) 0x0
        search_path = <value optimized out>
        pcbuilddir = <value optimized out>
        need_newline = <value optimized out>
        opt_context = (poptContext) 0x832f9b0
        options_table = {{longName = 0x0, shortName = 0 '\0', argInfo = 5, arg =
0x804deb0, val = 0, descrip = 0x0, argDescrip = 0x0}, {longName = 0x8059081
"version", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe64, val = 0, descrip =
0x805986e "output version of pkg-config", argDescrip = 0x0}, {longName =
0x805988b "modversion", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe60, val =
0, descrip = 0x8059896 "output version for package", argDescrip = 0x0},
{longName = 0x80598b1 "atleast-pkgconfig-version", shortName = 0 '\0', argInfo =
1, arg = 0xbf82fe14, val = 0, descrip = 0x8059bac "require given version of
pkg-config", argDescrip = 0x80598cb "VERSION"}, {longName = 0x8059026 "libs",
shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe5c, val = 0, descrip = 0x80598d3
"output all linker flags", argDescrip = 0x0}, {longName = 0x80598eb "static",
shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe3c, val = 0, descrip = 0x8059bd0
"output linker flags for static linking", argDescrip = 0x0}, {longName =
0x80598f2 "short-errors", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe38, val
= 0, descrip = 0x80598ff "print short errors", argDescrip = 0x0}, {longName =
0x8059912 "libs-only-l", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe54, val
= 0, descrip = 0x805991e "output -l flags", argDescrip = 0x0}, {longName =
0x805992e "libs-only-other", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe4c,
val = 0, descrip = 0x8059bf8 "output other libs (e.g. -pthread)", argDescrip =
0x0}, {longName = 0x805993e "libs-only-L", shortName = 0 '\0', argInfo = 0, arg
= 0xbf82fe50, val = 0, descrip = 0x805994a "output -L flags", argDescrip = 0x0},
{longName = 0x805904f "cflags", shortName = 0 '\0', argInfo = 0, arg =
0xbf82fe58, val = 0, descrip = 0x8059c1c "output all pre-processor and compiler
flags", argDescrip = 0x0}, {longName = 0x805995a "cflags-only-I", shortName = 0
'\0', argInfo = 0, arg = 0xbf82fe48, val = 0, descrip = 0x8059968 "output -I
flags", argDescrip = 0x0}, {longName = 0x8059978 "cflags-only-other", shortName
= 0 '\0', argInfo = 0, arg = 0xbf82fe44, val = 0, descrip = 0x8059c48 "output
cflags not covered by the cflags-only-I option", argDescrip = 0x0}, {longName =
0x805999d "variable", shortName = 0 '\0', argInfo = 1, arg = 0xbf82fe30, val =
0, descrip = 0x805998a "get the value of a variable", argDescrip = 0x80599a6
"VARIABLENAME"}, {longName = 0x80599b3 "define-variable", shortName = 0 '\0',
argInfo = 1, arg = 0x0, val = 1, descrip = 0x80599c3 "set the value of a
variable", argDescrip = 0x80599df "VARIABLENAME=VARIABLEVALUE"}, {longName =
0x80599fa "exists", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe2c, val = 0,
descrip = 0x8059c80 "return 0 if the module(s) exist", argDescrip = 0x0},
{longName = 0x8058764 "uninstalled", shortName = 0 '\0', argInfo = 0, arg =
0xbf82fe34, val = 0, descrip = 0x8059ca0 "return 0 if the uninstalled version of
one or more module(s) or their dependencies will be used", argDescrip = 0x0},
{longName = 0x8059a01 "atleast-version", shortName = 0 '\0', argInfo = 1, arg =
0xbf82fe20, val = 0, descrip = 0x8059d00 "return 0 if the module is at least
version VERSION", argDescrip = 0x80598cb "VERSION"}, {longName = 0x8059a11
"exact-version", shortName = 0 '\0', argInfo = 1, arg = 0xbf82fe1c, val = 0,
descrip = 0x8059d34 "return 0 if the module is at exactly version VERSION",
argDescrip = 0x80598cb "VERSION"}, {longName = 0x8059a1f "max-version",
shortName = 0 '\0', argInfo = 1, arg = 0xbf82fe18, val = 0, descrip = 0x8059d6c
"return 0 if the module is at no newer than version VERSION", argDescrip =
0x80598cb "VERSION"}, {longName = 0x8059a2b "list-all", shortName = 0 '\0',
argInfo = 0, arg = 0xbf82fe40, val = 0, descrip = 0x8059a34 "list all known
packages", argDescrip = 0x0}, {longName = 0x8059a4c "debug", shortName = 0 '\0',
argInfo = 0, arg = 0x805e3e8, val = 0, descrip = 0x8059da8 "show verbose debug
information", argDescrip = 0x0}, {longName = 0x8059a52 "print-errors", shortName
= 0 '\0', argInfo = 0, arg = 0x805e3ec, val = 0, descrip = 0x8059dc8 "show
verbose information about missing or conflicting packages", argDescrip = 0x0},
{longName = 0x8059a5f "silence-errors", shortName = 0 '\0', argInfo = 0, arg =
0xbf82fe10, val = 0, descrip = 0x8059dc8 "show verbose information about missing
or conflicting packages", argDescrip = 0x0}, {longName = 0x8059a6e
"errors-to-stdout", shortName = 0 '\0', argInfo = 0, arg = 0x805e3f0, val = 0,
descrip = 0x8059e08 "print errors from --print-errors to stdout not stderr",
argDescrip = 0x0}, {longName = 0x8059a7f "print-provides", shortName = 0 '\0',
argInfo = 0, arg = 0xbf82fe28, val = 0, descrip = 0x8059e40 "print which
packages the package provides", argDescrip = 0x0}, {longName = 0x8059a8e
"print-requires", shortName = 0 '\0', argInfo = 0, arg = 0xbf82fe24, val = 0,
descrip = 0x8059e6c "print which packages the package requires", argDescrip =
0x0}, {longName = 0x0, shortName = 0 '\0', argInfo = 4, arg = 0x805e2e0, val =
0, descrip = 0x8059a9d "Help options", argDescrip = 0x0}, {longName = 0x0,
shortName = 0 '\0', argInfo = 0, arg = 0x0, val = 0, descrip = 0x0, argDescrip =
0x0}}
#6  0x00502f70 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#7  0x08049161 in _start ()
No symbol table info available.

Comment 1 Fedora Update System 2007-11-17 05:38:18 UTC
pkgconfig-0.22-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pkgconfig'

Comment 2 Stu Tomlinson 2007-11-17 14:16:32 UTC
I'd be more than happy to help test, but I'm on Fedora 7 - would installing this
Fedora 8 test candidate on Fedora 7 be likely to cause any problems?

Comment 3 Matthias Clasen 2007-11-17 22:15:24 UTC
The F8 rpm should work fine on F7

Comment 4 Fedora Update System 2007-11-26 18:38:41 UTC
pkgconfig-0.22-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Yan Tian 2007-12-28 08:23:50 UTC
Verified it was fixed in pkgconfig-0.22-4.fc8.

Comment 6 Stu Tomlinson 2008-01-04 03:09:40 UTC
I've confirmed this is fixed in Fedora 8 pkgconfig, but this report is about
Fedora 7. Re-opening.

Can we have an update for Fedora 7 please :)

Comment 7 Fedora Update System 2008-02-05 19:01:30 UTC
pkgconfig-0.21-6.fc7 has been submitted as an update for Fedora 7

Comment 8 Fedora Update System 2008-02-19 03:17:18 UTC
pkgconfig-0.21-6.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.