bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-ncurses] Patch ncurses-6.1-20191214 breaks cal from util-linux-


From: Thomas Dickey
Subject: Re: [bug-ncurses] Patch ncurses-6.1-20191214 breaks cal from util-linux-2.34
Date: Wed, 18 Dec 2019 05:19:56 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Dec 18, 2019 at 10:08:41AM +0100, Dr. Werner Fink wrote:
> On 2019/12/18 09:36:55 +0100, Dr. Werner Fink wrote:
> > Hi
> > 
> > with latest ncurses-6.1-20191214.patch applied, I see a crash of the
> > cal(1) utility from package util-linux-2.34.
> > 
> > abuild@noether:~/rpmbuild/BUILD/util-linux-2.34> gdb -q --args ./cal 
> > Reading symbols from ./cal...
> > (gdb) run
> > Starting program: /home/abuild/rpmbuild/BUILD/util-linux-2.34/cal 
> > warning: Unable to open "/usr/lib64/librpm.so.8" (/usr/lib64/librpm.so.8: 
> > cannot open shared object file: No such file or directory), missing 
> > debuginfos notifications will not be displayed
> > Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
> > Try: zypper install -C 
> > "debuginfo(build-id)=8ffe0e6d1fb02d2198441fd39b5eed1fb6d79848"
> > Missing separate debuginfo for /lib64/libc.so.6
> > Try: zypper install -C 
> > "debuginfo(build-id)=3c0febc7b717f849ba5c790eefab156f43417733"
> > Missing separate debuginfo for /lib64/libtinfo.so.6
> > Try: zypper install -C 
> > "debuginfo(build-id)=f2d889f43d57068062b1dd79ba51fb383d1eb899"
> >     December 2019   
> > Su Mo Tu We Th Fr Sa
> >  1  2  3  4  5  6  7
> >  8  9 10 11 12 13 14
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff7ea06b6 in __strlen_sse2 () from /lib64/libc.so.6
> > (gdb) bt
> > #0  0x00007ffff7ea06b6 in __strlen_sse2 () from /lib64/libc.so.6
> > #1  0x00007ffff7e6e93e in __vfprintf_internal () from /lib64/libc.so.6
> > #2  0x00007ffff7e80666 in __vsnprintf_internal () from /lib64/libc.so.6
> > #3  0x00007ffff7f0f6cd in __snprintf_chk () from /lib64/libc.so.6
> > #4  0x000055555555bdbb in snprintf (__fmt=0x55555555d1ac "%*s%s%*d%s", 
> > __n=300, __s=<optimized out>) at /usr/include/bits/stdio2.h:67
> > #5  cal_output_months (ctl=<optimized out>, month=<optimized out>) at 
> > misc-utils/cal.c:835
> > #6  monthly (ctl=0x555555561020 <ctl>) at misc-utils/cal.c:903
> > #7  0x00005555555588f0 in main (argc=<optimized out>, argv=<optimized out>) 
> > at misc-utils/cal.c:606
> > 
> > this seems to caused by a header file from ncurses as the resulting
> > binary cal(1) also crashes with an old libtinfo (pre 6.1-20191214).
> > 
> 
> Looks like the (auto)config of util-linux can not handle ncursesw/term.h
> 
>  configure:21443: checking ncursesw/term.h usability
>  configure:21443: gcc -c -O2 -Wall -D_FORTIFY_SOURCE=2 
> -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
> -fstack-clash-protection -Werror=return-type -flto=auto -ffat-lto-objects -g 
> -D_GNU_SOURCE  conftest.c >&5
>  In file included from conftest.c:206:
>  /usr/include/ncursesw/term.h: In function 'exit_terminfo':
>  /usr/include/ncursesw/term.h:856:51: error: expected declaration specifiers 
> before 'GCC_NORETURN'
>    856 | extern NCURSES_EXPORT(void)    exit_terminfo(int) GCC_NORETURN;
>        |                                                   ^~~~~~~~~~~~
>  /usr/include/ncursesw/term.h:856:46: error: parameter name omitted
>    856 | extern NCURSES_EXPORT(void)    exit_terminfo(int) GCC_NORETURN;
>        |                                              ^~~
>  conftest.c:206: error: expected '{' at end of input
>    206 | #include <ncursesw/term.h>
>        | 
>  configure:21443: $? = 1
>  configure: failed program was:
> 
> ... it seems that there is missed in term.h something like
> 
>  #ifndef GCC_NORETURN
>  #define GCC_NORETURN /* nothing */
>  #endif
> 
> indeed with this before exit_terminfo() the cal(1) does not crash anymore

I see (not sure how it would have actually compiled/installed).

thanks

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]