bug report: memory leak in ctime ?
Hello there,
i'm not even sure if this is a memory leak or not, but ccmalloc seems to think
so:
+-----------+-------------+-------------+-------------+
| bytes| 2613215 | 2611932 | 1283 |
+-----------+-------------+-------------+-------------+
|allocations| 27097 | 27091 | 6 |
+-----------------------------------------------------+
| number of checks: 543 |
| number of counts: 54188 |
| retrieving function names for addresses ... done. |
| reading file info from gdb ... done. |
| sorting by number of not reclaimed bytes ... done. |
| number of call chains: 3 |
| number of ignored call chains: 0 |
| number of reported call chains: 3 |
| number of internal call chains: 0 |
| number of library call chains: 3 |
=======================================================
* 95.1% = 1220 Bytes of garbage allocated in 1 allocation
| | 1 allocated (1220 Bytes = 0.0% of total allocated)
| | 0x40091a42 <???>
| | 0x080bb03c <main> comm.c:486
| | 0x400eb601 <???>
| | 0x400eb70a <???>
| | 0x400eea73 <???>
| | 0x400edd0b <???>
| | 0x400eedc4 <???>
| `-----> 0x0818b0b3 <malloc>
| 3.7% = 48 Bytes of garbage allocated in 4 allocations
| | 4 allocated (48 Bytes = 0.0% of total allocated)
| | 0x40091a42 <???>
| | 0x080bb03c <main> comm.c:486
| | 0x400eb601 <???>
| | 0x400eb70a <???>
| | 0x400eea73 <???>
| | 0x400edd0b <???>
| | 0x400ef1de <???>
| | 0x400edbb0 <???>
| `-----> 0x0818b0b3 <malloc>
| 1.2% = 15 Bytes of garbage allocated in 1 allocation
| | 1 allocated (15 Bytes = 0.0% of total allocated)
| | 0x40091a42 <???>
| | 0x080bb03c <main> comm.c:486
| | 0x400eb601 <???>
| | 0x400eb70a <???>
| | 0x400eea73 <???>
| | 0x400edce6 <???>
| | 0x400ccd4f <???>
| `-----> 0x0818b0b3 <malloc>
`------------------------------------------------------
here is the chunk of code the line starting with strcpy is line 486:
/*
* Init time.
*/
gettimeofday( &now_time, NULL );
current_time = (time_t) now_time.tv_sec;
strcpy( str_boot_time, ctime( ¤t_time ) );
now_time is struct timeval
current_time is time_t
str_boot_time is str_boot_time[255]
i'm running debian-potato kernel v2.2.5, and here is the libc6 package info:
Package: libc6
Status: install ok installed
Priority: required
Section: base
Installed-Size: 9568
Maintainer: Joel Klecker <debian-glibc@lists.debian.org>
Source: glibc
Version: 2.1.3-10
Please let me know what to do with this info or what else you will need.
Thanks,
Dingo.
).|.(
'.`___'.`
' `(>~<)' `
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-ooO-=(_)=-Ooo-=-=-=-=-=-=-=-=-=-=-=-=-
Petr [Dingo] Dvorak dingo@pdragon.inetsolve.com
Coder - Purple Dragon MUD pdragon.inetsolve.com port 5555
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ 369D93 ]=-
Just because you paranoid, it doesn't mean, they're not after you
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply to: