Bug 707344 - Flash() segfaults
Summary: Flash() segfaults
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: ncurses
Version: 14
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-24 18:40 UTC by r3obh
Modified: 2011-05-30 14:01 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-05-30 10:16:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description r3obh 2011-05-24 18:40:56 UTC
Description of problem:

$ cat foo.c && gcc foo.c -lcurses && ./a.out
#include <curses.h>

int main() {
  flash();
  return 0;
}
Segmentation fault (core dumped)


Version-Release number of selected component (if applicable):

ncurses-libs-5.7-9.20100703.fc14.x86_64

How reproducible:

Always

Comment 1 Thomas E. Dickey 2011-05-25 22:47:11 UTC
I can make it not dump core, but it won't flash since
curses is not initialized (man initscr, newterm).

Comment 2 Miroslav Lichvar 2011-05-26 10:40:10 UTC
I get the crash, with ncurses-5.9 the backtrace is:

70	    if (flash_screen) {
(gdb) bt
#0  0x00007ffff7bc13d1 in flash () at ../../ncurses/base/lib_flash.c:70

Comment 3 Thomas E. Dickey 2011-05-26 21:46:21 UTC
yes - but my point was that while I can modify ncurses to
avoid the core dump, the program will never function as
the reporter intended.  (I've made fixes of this sort before).

Comment 4 r3obh 2011-05-27 00:30:50 UTC
The doc says that on failure, the function does nothing and returns ERR.

Comment 5 Miroslav Lichvar 2011-05-30 10:16:15 UTC
This seems to be fixed in upstream patch 5.9-20110528. Thanks.

Comment 6 Thomas E. Dickey 2011-05-30 14:01:36 UTC
no problem.


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