bug-ncurses
[Top][All Lists]
Advanced

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

Help - ncursers show garbag in application when compiled with gcc versio


From: Vinay Goutham Pullela
Subject: Help - ncursers show garbag in application when compiled with gcc version 2.95.4
Date: Thu, 22 Mar 2007 05:58:27 +0000

Hi,

I have a application where I am using ncursers, but I am facing a
strange
problem,
I have 2 systems as mentioned below:-

SYSTEM1: gcc version 2.95.4
address@hidden:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

SYSTEM2: gcc version 3.3.5
address@hidden:~$gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang
--prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared
--enable-__cxa_atexit --with-system-zlib --enable-nls
--without-included-gettext --enable-clocale=gnu --enable-debug
--enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc
i486-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)

The Application gets compiled in both the systems, but the binary form
SYSTEM1 displays garbag as you can see in the attachment, but the
binary
form SYSTEM2 is working fine, but in the both case the ncursers in
leaking
memory(Used Valgrind for checking) which I am attaching below:-

==4242== 18 bytes in 1 blocks are still reachable in loss record 8 of
43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x406CBC5: _nc_home_terminfo (in /lib/libncurses.so.5.4)
==4242==    by 0x4073BE8: _nc_read_entry (in /lib/libncurses.so.5.4)
==4242==    by 0x406E0EE: (within /lib/libncurses.so.5.4)
==4242==    by 0x406E450: setupterm (in /lib/libncurses.so.5.4)
==4242==    by 0x405C84C: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 66 bytes in 1 blocks are still reachable in loss record 13 of
43
==4242==    at 0x401DD75: realloc (vg_replace_malloc.c:306)
==4242==    by 0x406C97F: _nc_doalloc (in /lib/libncurses.so.5.4)
==4242==    by 0x407045F: (within /lib/libncurses.so.5.4)
==4242==    by 0x406F551: tparm (in /lib/libncurses.so.5.4)
==4242==    by 0x405AE77: _nc_mvcur_init (in /lib/libncurses.so.5.4)
==4242==    by 0x405CAC7: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 114 bytes in 19 blocks are still reachable in loss record 17
of 43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x40F048F: strdup (in /lib/tls/libc-2.3.6.so)
==4242==    by 0x406E507: setupterm (in /lib/libncurses.so.5.4)
==4242==    by 0x405C84C: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 128 bytes in 1 blocks are still reachable in loss record 18 of
43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x40557AB: start_color (in /lib/libncurses.so.5.4)
==4242==    by 0x807E47B: initializeNcursesEnvironment (imsttui.c:171)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 172 bytes in 1 blocks are still reachable in loss record 20 of
43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x406E437: setupterm (in /lib/libncurses.so.5.4)
==4242==    by 0x405C84C: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 320 bytes in 4 blocks are still reachable in loss record 26 of
43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x405D09B: _nc_makenew (in /lib/libncurses.so.5.4)
==4242==    by 0x405CDBF: newwin (in /lib/libncurses.so.5.4)
==4242==    by 0x405F259: _nc_setupscreen (in /lib/libncurses.so.5.4)
==4242==    by 0x405C938: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 1,174 bytes in 1 blocks are still reachable in loss record 32
of 43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x4073120: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073934: _nc_read_file_entry (in
/lib/libncurses.so.5.4)
==4242==    by 0x40739F8: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073A8F: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073C3E: _nc_read_entry (in /lib/libncurses.so.5.4)
==4242==    by 0x406E0EE: (within /lib/libncurses.so.5.4)
==4242==    by 0x406E450: setupterm (in /lib/libncurses.so.5.4)
==4242==    by 0x405C84C: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 1,512 bytes in 1 blocks are still reachable in loss record 34
of 43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x405F03C: _nc_setupscreen (in /lib/libncurses.so.5.4)
==4242==    by 0x405C938: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 1,512 bytes in 1 blocks are still reachable in loss record 34
of 43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x405F03C: _nc_setupscreen (in /lib/libncurses.so.5.4)
==4242==    by 0x405C938: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 1,656 bytes in 1 blocks are still reachable in loss record 35
of 43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x4073319: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073934: _nc_read_file_entry (in
/lib/libncurses.so.5.4)
==4242==    by 0x40739F8: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073A8F: (within /lib/libncurses.so.5.4)
==4242==    by 0x4073C3E: _nc_read_entry (in /lib/libncurses.so.5.4)
==4242==    by 0x406E0EE: (within /lib/libncurses.so.5.4)
==4242==    by 0x406E450: setupterm (in /lib/libncurses.so.5.4)
==4242==    by 0x405C84C: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 1,800 bytes in 1 blocks are still reachable in loss record 36
of 43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x4053C9E: _nc_hash_map (in /lib/libncurses.so.5.4)
==4242==    by 0x40533E9: _nc_scroll_optimize (in
/lib/libncurses.so.5.4)
==4242==    by 0x4062D7A: doupdate (in /lib/libncurses.so.5.4)
==4242==    by 0x405DED6: wrefresh (in /lib/libncurses.so.5.4)
==4242==    by 0x8080CC3: periodicRefreshUIParameters (imsttui.c:992)
==4242==    by 0x8056D5E: uiThread (imstt.c:841)
==4242==    by 0x8054415: normalThreadStart (framework.c:407)
==4242==    by 0x8053E62: threadStartFunction (framework.c:168)
==4242==    by 0x40300BC: start_thread (in
/lib/tls/libpthread-2.3.6.so)
==4242==    by 0x415092D: clone (in /lib/tls/libc-2.3.6.so)
==4242==
==4242==
==4242== 2,112 bytes in 4 blocks are still reachable in loss record 37
of 43
==4242==    at 0x401DC78: calloc (vg_replace_malloc.c:279)
==4242==    by 0x405D0B7: _nc_makenew (in /lib/libncurses.so.5.4)
==4242==    by 0x405CDBF: newwin (in /lib/libncurses.so.5.4)
==4242==    by 0x405F259: _nc_setupscreen (in /lib/libncurses.so.5.4)
==4242==    by 0x405C938: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 2,800 bytes in 1 blocks are still reachable in loss record 38
of 43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x4073D0D: _nc_set_buffer (in /lib/libncurses.so.5.4)
==4242==    by 0x405F073: _nc_setupscreen (in /lib/libncurses.so.5.4)
==4242==    by 0x405C938: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)
==4242==
==4242==
==4242== 5,739 bytes in 3 blocks are still reachable in loss record 39
of 43
==4242==    at 0x401C6E7: malloc (vg_replace_malloc.c:149)
==4242==    by 0x406C9B7: _nc_doalloc (in /lib/libncurses.so.5.4)
==4242==    by 0x406F505: _nc_tparm_analyze (in /lib/libncurses.so.5.4)
==4242==    by 0x406F781: (within /lib/libncurses.so.5.4)
==4242==    by 0x406F551: tparm (in /lib/libncurses.so.5.4)
==4242==    by 0x405AE77: _nc_mvcur_init (in /lib/libncurses.so.5.4)
==4242==    by 0x405CAC7: newterm (in /lib/libncurses.so.5.4)
==4242==    by 0x4059917: initscr (in /lib/libncurses.so.5.4)
==4242==    by 0x807E476: initializeNcursesEnvironment (imsttui.c:170)
==4242==    by 0x807E1D6: initializeUI (imsttui.c:59)
==4242==    by 0x80557F6: main (imstt.c:1470)

Warm Regards,
Vinay

_________________________________________________________________
Post ads for free. On new MSN Classifieds. http://www.yello.in/home.php?utm_source=hotmailtag&utm_medium=textlink&utm_content=in&utm_campaign=intro

Attachment: gcc2.95.5.jpg
Description: JPEG image


reply via email to

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