This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with brk() call when using with libncurses-4.2.so


Hi,

I've been working on a new ncurses application at work yesterday. I have
come across a strange problem whilst compiling it on my home machine today
- it's now apparent that all newly recompiled ncurses application dies
with a segmentation fault.

Older ncurses applications that I compiled a long time ago (3 months ago)
works fine. 

Here's the output from strace:
brk(0)                                  = 0x8049e94
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5822, ...}) = 0
mmap(0, 5822, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3)                                = 0
open("/usr/lib/libncurses.so.4", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 259660, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40017000
mprotect(0x4004b000, 46668, PROT_NONE)  = 0
mmap(0x4004b000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x33000) = 0x4004b000
mmap(0x40053000, 13900, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|0x20, 4294967295, 0) = 0x40053000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 948664, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40057000
mprotect(0x40137000, 31160, PROT_NONE)  = 0
mmap(0x40137000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xdf000) = 0x40137000
mmap(0x4013c000, 10680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|0x20, 4294967295, 0) = 0x4013c000
close(3)                                = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20, 4294967295, 0) = 0x4013f000
munmap(0x40015000, 5822)                = 0
SYS_136(0, 0x1, 0x4013ad5c, 0xbffff7dc, 0xbffff7d4) = 0
getpid()                                = 1109
brk(0)                                  = 0x8049e94
brk(0x8049ecc)                          = 0x8049ecc
brk(0x804a000)                          = 0x804a000
brk(0x804b000)                          = 0x804b000
open("/usr/lib/terminfo/x/xterm", O_RDONLY) = 3
read(3, "\32\0010\0\17\0\17\0i\1Y\2", 12) = 12
read(3, "xterm|xterm terminal emulator (X"..., 48) = 48
read(3, "\0\1\0\0\1\0\0\0\1\0\0\0\0\1\1", 15) = 15
read(3, "\0", 1)                        = 1
read(3, "P\0\10\0\30\0\377\377\377\377\377"..., 30) = 30
read(3, "\377\377\0\0\2\0\4\0\25\0\32\0\""..., 722) = 722
read(3, "\7\0\r\0\33[%i%p1%d;%p2%dr\0\33["..., 601) = 601
close(3)                                = 0
ioctl(1, TCGETS, 0xbffff67c)            = -1 ENOTTY (Not a typewriter)
ioctl(2, TCGETS, 0xbffff658)            = -1 ENOTTY (Not a typewriter)
brk(0x804c000)                          = 0x804c000
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

That's where it dies. System statistics in signature; using egcs-1.1.1
with binutils-2.9.1.0.19a. 

Cheers,
Alex
--
 /\_/\  Legalise cannabis now! 
( o.o ) Grow some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk - *new* - rewritten for text browser users!

Linux tahallah 2.2.0-pre5 #69 SMP Thu Jan 7 18:39:39 EST 1999
Two Intel Pentium Pro 166MHz processors, 331.78 total bogomips, 48M RAM
System library 2.0.109



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]