Summary: | sys-libs/readline: rlfe terminfo run test segfaults when tgoto() has implicit decl | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://lists.gnu.org/archive/html/bug-readline/2011-10/msg00000.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
/var/tmp/portage/sys-libs/readline-6.2_p1/work/readline-6.2/config.log
/var/tmp/portage/sys-libs/readline-6.2_p1/work/readline-6.2/examples/rlfe/config.log |
Description
Agostino Sarubbo
![]() past the config.log do the same test fail on default kernel to? Created attachment 288373 [details]
/var/tmp/portage/sys-libs/readline-6.2_p1/work/readline-6.2/config.log
Created attachment 288375 [details]
/var/tmp/portage/sys-libs/readline-6.2_p1/work/readline-6.2/examples/rlfe/config.log
so try building & running the code in question: $ cat test.c main(){exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);} $ gcc test.c -O2 && ./a.out fails to compile: test.c: In function 'main': test.c:1: warning: incompatible implicit declaration of built-in function 'exit' /tmp/ccwXMGvk.o: In function `main': test.c:(.text+0x23): undefined reference to `tgoto' collect2: ld returned 1 exit status link in -lncurses returns only segmentation fault does tgoto return NULL ? what if you do: gcc -include term.h test.c -lcurses && ./a.out Now runs without errors, but not shows any output simple "implicit decl truncates pointer return type" bug (In reply to comment #10) > simple "implicit decl truncates pointer return type" bug Well, thanks for the interest and rapid response. should be all set now in the tree; thanks for the report! Commit message: Fix tgoto test in rlfe example http://sources.gentoo.org/sys-libs/readline/files/readline-6.2-rlfe-tgoto.patch?rev=1.1 http://sources.gentoo.org/sys-libs/readline/readline-6.2_p5.ebuild?rev=1.1 |