Bug 546832 - cscope segfaults when multiple options are given in one argument
Summary: cscope segfaults when multiple options are given in one argument
Keywords:
Status: CLOSED DUPLICATE of bug 547023
Alias: None
Product: Fedora
Classification: Fedora
Component: cscope
Version: 12
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-12 06:25 UTC by Watanabe, Yuki
Modified: 2009-12-14 14:09 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-12-14 14:09:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
core file (428.00 KB, application/octet-stream)
2009-12-14 12:15 UTC, Watanabe, Yuki
no flags Details

Description Watanabe, Yuki 2009-12-12 06:25:41 UTC
Description of problem:
After updating to cscope-15.6-6.fc12 (i686), cscope does not correctly parse multiple options given after a single hyphen.
For example, "cscope -b -R" is OK, but "cscope -bR" segfaults.

Version-Release number of selected component (if applicable):
cscope-15.6-6.fc12 (i686)

How reproducible:
Cscope segfaults for most combinations of options, but not all.
"cscope -ld" does not segfault.

Comment 1 Neil Horman 2009-12-14 01:02:58 UTC
do you have a backtrace?

Comment 2 Watanabe, Yuki 2009-12-14 12:15:32 UTC
Created attachment 378194 [details]
core file

Attaching a core file created by "cscope -bR".
Cscope was run in a directory containing a dummy empty file "temp.c" only.

Backtrace:
#0  strchr () at ../sysdeps/i386/strchr.S:67
#1  0x0805170c in compath (pathname=<value optimized out>) at compath.c:69
#2  0x080529e4 in infilelist (path=<value optimized out>) at dir.c:623
#3  0x08053787 in makefilelist () at dir.c:280
#4  0x0805af18 in main (argc=-1, argv=<value optimized out>) at main.c:688

Comment 3 Neil Horman 2009-12-14 13:19:51 UTC
I don't see how this is happening.  specifying multiple options like that should result in an error exit condition, and not get to this point.  Are you using an existing cscope.out file when this occurs?  Also, what version of glibc are you running with?

Comment 4 Neil Horman 2009-12-14 13:21:53 UTC
Also, not that I purposely changed the implementation of how cscope operates to use the gnu getopt_long interface because the current implementation was filled with possible errors that led to stack overflows.  As the latest implementation of getopt long doesn't support the specification of multiple options in 1 argument, doing so in cscope won't be supported any more.

Comment 5 Neil Horman 2009-12-14 13:24:35 UTC
scratch that last comment, I just got it to reproduce.

Comment 6 Neil Horman 2009-12-14 14:09:18 UTC
ok, found the problem, and it identical to another bug I have, I'm closing this a duplicate of that.

*** This bug has been marked as a duplicate of bug 547023 ***


Note You need to log in before you can comment on or make changes to this bug.