Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
segfault in _int_malloc() in /lib/libc.so.6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Fri Jul 04, 2003 1:42 pm    Post subject: segfault in _int_malloc() in /lib/libc.so.6 Reply with quote

Under what conditions would malloc() segfault?

I want to know because my program keeps on dieing, at the same place. (This is after processing (mmap, munmap) about 2280 files...)

Could it be a address space shortage?

If you want to help me debug my program, I can send you the instructions and source code.

Here is as much backtrace as I can give:

Code:

#0  0x400a04a5 in _int_malloc () from /lib/libc.so.6
No symbol table info available.
#1  0x4009f66f in malloc () from /lib/libc.so.6
No symbol table info available.
#2  0x40056dd0 in qsort () from /lib/libc.so.6
No symbol table info available.
#3  0x08049d5c in SCDoFile (ext_filename=0x4015131c "") at shred-compare.c:262
        fileStat = {st_dev = 837, __pad1 = 0, st_ino = 163632, st_mode = 33188, st_nlink = 1, st_uid = 0, st_gid = 0, st_rdev = 0,
  __pad2 = 0, st_size = 3157, st_blksize = 4096, st_blocks = 8, st_atime = 1052628913, __unused1 = 0, st_mtime = 1052628913, __unused2 = 0,
  st_ctime = 1052628962, __unused3 = 0, __unused4 = 0, __unused5 = 0}
        chunkInfoArr = (struct SCChunkInfo *) 0x804bc38
        chunkInfo = (struct SCChunkInfo *) 0x804cf58
        filename = "/usr/src/linux/drivers/char/atarimouse.c", '\0' <repeats 983 times>
        md5sum_s = '\0' <repeats 32 times>
#4  0x0804a22d in main (argc=3, argv=0xbfffebd4) at shred-compare.c:333
        fd = (struct _IO_FILE *) 0x401512c0
        input = "/usr/src/linux/drivers/char/atarimouse.c\0\0\0\0\0\0\0\0\0\0ux.h\0\0\0\0c\0\0\0\0.c\0\0rboot.h", '\0' <repeats 949 times>
        i = 0
#5  0x40041d88 in __libc_start_main () from /lib/libc.so.6


/usr/src/linux/drivers/char/atarimouse.c is the 2280th file to be processed, excluding ./2.4.20-gentoo-r5.files

If a recompile is neccessary, I am at a loss for what CFLAGS to use. My current glibc CFLAGS are "-march=pentium3 -mcpu=pentium4 -pipe -O2" ; that is already quite conservative. Perhaps I will drop the -mcpu=pentium4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum