This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3158] New: Problem with realloc
- From: "nico-linux-glibc at schottelius dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 31 Aug 2006 12:41:06 -0000
- Subject: [Bug libc/3158] New: Problem with realloc
- Reply-to: sourceware-bugzilla at sourceware dot org
I am not sure, whether this is a glibc bug, I only see that it works on other
libcs (for instance on FreeBSD).
Output of my program:
[14:32] hydrogenium:tcpserver_blocker% ./out/tcpserver_analyzer ./test 1000000
20 40 60 -- 192.1.2.4 192.168.2.54
20
40
60
*** glibc detected *** realloc(): invalid next size: 0x0804b018 ***
zsh: abort ./out/tcpserver_analyzer ./test 1000000 20 40 60 -- 192.1.2.4
192.168.2.54
Output using gdb:
(gdb) set args ./test 1000000 20 40 60 -- 192.1.2.4 192.168.2.54
(gdb) run
Starting program:
/home/user/nico/oeffentlich/computer/projekte/tcpserver_blocker/out/tcpserver_analyzer
./test 1000000 20 40 60 -- 192.1.2.4 192.168.2.54
20
40
60
*** glibc detected *** realloc(): invalid next size: 0x0804b018 ***
Program received signal SIGABRT, Aborted.
0xb7e809e7 in raise () from /lib/tls/libc.so.6
(gdb) where
#0 0xb7e809e7 in raise () from /lib/tls/libc.so.6
#1 0xb7e82159 in abort () from /lib/tls/libc.so.6
#2 0xb7eb624a in __fsetlocking () from /lib/tls/libc.so.6
#3 0xb7ebfa17 in valloc () from /lib/tls/libc.so.6
#4 0xb7ec0325 in realloc () from /lib/tls/libc.so.6
#5 0x08048815 in do_argv (argc=9, argv=0xbfadfd70) at analyzer/do_argv.c:66
#6 0x0804896f in main (argc=9, argv=0xbfadfd54) at analyzer/main.c:18
(gdb)
The relevant source files can be found at
http://home.schottelius.org/~nico/temp/do_argv.c
http://home.schottelius.org/~nico/temp/analyzer.h
I do not hope that it is a programming mistake, but I and some other
guys did not see it in that case.
--
Summary: Problem with realloc
Product: glibc
Version: 2.3.6
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: nico-linux-glibc at schottelius dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3158
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.