pkgconf segfault when a require is specified with version number and the required .pc file is empty #85

Closed
opened 2015-12-29 14:11:05 +00:00 by lantw44 · 0 comments
lantw44 commented 2015-12-29 14:11:05 +00:00 (Migrated from github.com)

To reproduce the problem:

  • Create a empty file called 'a.pc'.
  • Create a file called 'b.pc' which lists 'a' in Requires:
Name: b
Version: 3
Requires: a >= 2
  • Run 'pkgconf --modversion b'.
Segmentation fault (core dumped)

Backtrace:

#0  0x0000000800b7e890 in strcasecmp_l () from /lib/libc.so.7
#1  0x00000008008271df in pkgconf_compare_version (a=0x0, b=0x8014080a8 "2") at ../libpkgconf/pkg.c:531
#2  0x0000000800827f31 in pkgconf_pkg_comparator_gte (pkg=<optimized out>, pkgdep=<optimized out>) at ../libpkgconf/pkg.c:692
#3  0x0000000800827ad4 in pkgconf_pkg_verify_dependency (flags=<optimized out>, eflags=<optimized out>, pkgdep=<optimized out>, flags=<optimized out>, 
    eflags=<optimized out>) at ../libpkgconf/pkg.c:804
#4  pkgconf_pkg_walk_list (parent=0x80140b100, deplist=<optimized out>, func=0x0, data=0x0, depth=<optimized out>, flags=0) at ../libpkgconf/pkg.c:878
#5  0x00000008008278f7 in pkgconf_pkg_traverse (root=0x80140b100, func=0x0, data=0x0, maxdepth=1999, flags=0) at ../libpkgconf/pkg.c:977
#6  0x0000000800827b7b in pkgconf_pkg_walk_list (parent=0x7ffffffee2c0, deplist=<optimized out>, func=0x0, data=0x0, depth=<optimized out>, flags=0)
    at ../libpkgconf/pkg.c:896
#7  0x00000008008278f7 in pkgconf_pkg_traverse (root=0x7ffffffee2c0, func=0x0, data=0x0, maxdepth=2000, flags=0) at ../libpkgconf/pkg.c:977
#8  0x00000008008298e5 in pkgconf_queue_verify (world=<optimized out>, list=<optimized out>, maxdepth=<optimized out>, world=<optimized out>, list=<optimized out>, 
    maxdepth=<optimized out>, flags=<optimized out>) at ../libpkgconf/queue.c:68
#9  pkgconf_queue_validate (list=<optimized out>, maxdepth=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, flags=0)
    at ../libpkgconf/queue.c:112
#10 0x000000000040215d in main (argc=<optimized out>, argv=<optimized out>) at ../main.c:895
To reproduce the problem: - Create a empty file called 'a.pc'. - Create a file called 'b.pc' which lists 'a' in Requires: ``` Name: b Version: 3 Requires: a >= 2 ``` - Run 'pkgconf --modversion b'. ``` Segmentation fault (core dumped) ``` Backtrace: ``` #0 0x0000000800b7e890 in strcasecmp_l () from /lib/libc.so.7 #1 0x00000008008271df in pkgconf_compare_version (a=0x0, b=0x8014080a8 "2") at ../libpkgconf/pkg.c:531 #2 0x0000000800827f31 in pkgconf_pkg_comparator_gte (pkg=<optimized out>, pkgdep=<optimized out>) at ../libpkgconf/pkg.c:692 #3 0x0000000800827ad4 in pkgconf_pkg_verify_dependency (flags=<optimized out>, eflags=<optimized out>, pkgdep=<optimized out>, flags=<optimized out>, eflags=<optimized out>) at ../libpkgconf/pkg.c:804 #4 pkgconf_pkg_walk_list (parent=0x80140b100, deplist=<optimized out>, func=0x0, data=0x0, depth=<optimized out>, flags=0) at ../libpkgconf/pkg.c:878 #5 0x00000008008278f7 in pkgconf_pkg_traverse (root=0x80140b100, func=0x0, data=0x0, maxdepth=1999, flags=0) at ../libpkgconf/pkg.c:977 #6 0x0000000800827b7b in pkgconf_pkg_walk_list (parent=0x7ffffffee2c0, deplist=<optimized out>, func=0x0, data=0x0, depth=<optimized out>, flags=0) at ../libpkgconf/pkg.c:896 #7 0x00000008008278f7 in pkgconf_pkg_traverse (root=0x7ffffffee2c0, func=0x0, data=0x0, maxdepth=2000, flags=0) at ../libpkgconf/pkg.c:977 #8 0x00000008008298e5 in pkgconf_queue_verify (world=<optimized out>, list=<optimized out>, maxdepth=<optimized out>, world=<optimized out>, list=<optimized out>, maxdepth=<optimized out>, flags=<optimized out>) at ../libpkgconf/queue.c:68 #9 pkgconf_queue_validate (list=<optimized out>, maxdepth=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, flags=0) at ../libpkgconf/queue.c:112 #10 0x000000000040215d in main (argc=<optimized out>, argv=<optimized out>) at ../main.c:895 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#85
There is no content yet.