Bug 56670 - ncurses mvgatch() function segfaults
Summary: ncurses mvgatch() function segfaults
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ncurses
Version: 7.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-23 22:26 UTC by Rick Richardson
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-24 21:02:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Rick Richardson 2001-11-23 22:26:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-13 i686)

Description of problem:

$ rpm -q --whatprovides /usr/lib/libncurses.so
ncurses-devel-5.2-12

$ cat broke.c
#include <ncurses.h>

main()
{
        attr_t  attr;

        attr = 0;
        initscr();
        mvchgat(0, 0, 40, attr, 0, NULL);
        refresh();
        endwin();
}

$ gcc  -g -o broke  broke.c -lm -lncurses
$ ./broke
Segmentation fault

Well, there's the problem, alrlright!

If linked against the libncurses.so that was in RH 7.0, it works fine.


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


How reproducible:
Always

Comment 1 Rick Richardson 2001-11-24 21:01:55 UTC
Here's a workaround if you have the luxury of being able to recompile the
application... but it won't fix any applications that are binary-only...

#if 0
        // Busted in RH 7.2
        mvchgat(y, x, wid, attr, 0, NULL);
#else
        {
                int     i;

                for (i = 0; i < wid; ++i)
                {
                        chtype  ch;

                        ch = mvinch(y, x+i);
                        ch &= 0xff;
                        ch |= attr;
                        mvaddch(y, x+i, ch);
                }
        }
#endif


Comment 2 Bernhard Rosenkraenzer 2001-11-27 15:12:46 UTC
Fixed in 5.2-13


Comment 3 Rick Richardson 2001-11-27 17:21:05 UTC
I am confused.  This library is fundamental to the proper operation of Curses
applications.
Why isn't the fix being made available to all Redhat 7.2 users via Update
Agent?  Is it
Redhat's intent that binary applications must be statically linked with a
working ncurses,
rather than with the broken dynamic library supplied in RH 7.2?



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