Opened 10 years ago

Closed 6 years ago

#3810 closed bug (fixed)

Segment violation in tgetent() call in ncurses implementation.

Reported by: siarzhuk Owned by: axeld
Priority: normal Milestone:
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Following program, compiled with libncurses, produce segment violation error during run:

#include <termcap.h>
int main(int argc, char** argv)
{
	char bp[2048] = {0};
	return tgetent(bp, "beos-ansi");
}

Stack backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x002b18b9 in strchr () from /boot/system/lib/libroot.so
(gdb) bt
#0  0x002b18b9 in strchr () from /boot/system/lib/libroot.so
#1  0x0020f977 in force_bar ()
#2  0x0020fa27 in _nc_entry_match ()
#3  0x0020fcc6 in _nc_resolve_uses2 ()
#4  0x0020ee5c in _nc_read_termcap_entry ()
#5  0x0020b665 in grab_entry ()
#6  0x0020bb43 in _nc_setupterm ()
#7  0x00209e46 in tgetent ()
#8  0x00209df2 in main () 

The History: This problem was found during porting vim 7.2 to Haiku. It was observed after the start of the application from the Tracker. Normal call of vim in Terminal was ok. Was resolved in vim by changing default terminal from "beos-ansi" to "xterm".

Change History (1)

comment:1 Changed 6 years ago by siarzhuk

Resolution: fixed
Status: newclosed

Is not more reproducible. Checked on hrev45705.

Note: See TracTickets for help on using tickets.