Skip to content

cscope crahes #14265

@praveen-pk

Description

@praveen-pk

Describe the bug
Cscope always crahes with SEGFAULT.

To Reproduce
Steps to reproduce the behavior:

docker run --rm -i -t azurelinux3:latest bash
root [ / ]# tdnf -y install git cscope ca-certificates

root [ / ]# git clone https://github.com/libvirt/libvirt
root [ / ]# cd libvirt
root [ / ]# cscope-indexer -r . 
root [ / ]# cscope -d
Segmentation fault (core dumped)

Config

# cat /etc/azurelinux-release
Azure Linux 3.0
AZURELINUX_BUILD_NUMBER=3.0.20250206


 # rpm -qa | grep -E "cscope|ncurses"
ncurses-libs-6.4-2.azl3.x86_64
ncurses-6.4-2.azl3.x86_64
ncurses-compat-6.4-2.azl3.x86_64
cscope-15.9-8.azl3.x86_64

Gdb

# gdb cscope
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from cscope...
Reading symbols from /usr/lib/debug/bin/cscope-15.9-8.azl3.x86_64.debug...
(gdb) run -d
Starting program: /usr/bin/cscope -d
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation faultwarning: could not convert 'si_code' from the host encoding (ANSI_X3.4-1968) to UTF-32.
This normally should not happen, please file a bug report.
.
_nc_init_acs_sp (sp=0x5624cf970a50) at ../../ncurses/tinfo/lib_acs.c:96
96                  real_map[j] = 0;
(gdb) where
#0  _nc_init_acs_sp (sp=0x5624cf970a50) at ../../ncurses/tinfo/lib_acs.c:96
#1  0x00007fc60e7bf413 in _nc_init_acs () at ../../ncurses/tinfo/lib_acs.c:255
#2  0x00007fc60e7f6e8a in _nc_setupscreen (slines=<optimized out>, scolumns=<optimized out>,
    output=output@entry=0x7fc60e79e5c0 <_IO_2_1_stdout_>, filtered=<optimized out>,
    slk_format=slk_format@entry=0) at ../../ncurses/base/lib_set_term.c:638
#3  0x00007fc60e7f3b21 in newterm (name=name@entry=0x5624cf96c2a0 "xterm",
    ofp=<optimized out>, ifp=<optimized out>) at ../../ncurses/base/lib_newterm.c:234
#4  0x00007fc60e7f0150 in initscr () at ../../ncurses/base/lib_initscr.c:93
#5  0x00005624be7de730 in main (argc=<optimized out>, argv=0x7ffe225364a8) at main.c:574

Expected behavior
cscope should not SEGFAULT

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions