httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Randall <crand...@matchlogic.com>
Subject RE: [PATCH] using freed memory, and a memory debugger
Date Thu, 09 Oct 1997 22:16:33 GMT
FYI,

As a baseline (before installing these patches), I compiled 1.3b1 on a
Solaris 2.5.1 machine with 'gcc -g' (in all of the Makefiles) and built
a purify'd version.

I then ran lynx in "crawl" mode (lynx -traversal -realm -crawl) against
the local Apache documentation.

I've appended the purify output below. I'll apply the patches and
continue testing this evening.

-Charles
crandall@matchlogic.com

****  Purify instrumented ./httpd (pid 10768 at Thu Oct  9 16:08:54
1997)
  * Purify 4.0.1 Solaris 2, Copyright (C) 1992-1996 Pure Atria Corp. All
rights reserved. 
  * For contact information type: "purify -help"
  * For Purify Viewer output, set the DISPLAY environment variable.
  * Command-line: ./httpd -X -d \
    /home/dvlp/crandall/projects/apache/apache_1.3b1/src/.. 
  * Options settings: -purify \
    -purify-home=/usr/local/bin/rational/purify-4.0.1-solaris2/
-threads=yes \
    -thread_stack_change=0x4000 -mt_safe_malloc=yes 
  * Purify licensed to Purify Evaluation User
  * Purify checking enabled.

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	update_vhost_given_ip [http_vhost.c:753]
	new_connection [http_main.c:2230]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 2 bytes from 0x12c82a in the heap.
  * Address 0x12c82a is 4146 bytes into a malloc'd block at 0x12b7f8 of
8216 bytes.
  * This block was allocated from:
	malloc         [rtlib.o]
	malloc_block   [alloc.c:107]
	new_block      [alloc.c:207]
	palloc         [alloc.c:390]
	bcreate        [buff.c:259]
	child_main     [http_main.c:2783]

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	update_vhost_given_ip [http_vhost.c:756]
	new_connection [http_main.c:2230]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 4 bytes from 0xeffff518 on the stack.
  * Address 0xeffff518 is local variable "server_ip" in function
update_vhost_given_ip.

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	inet_ntoa      [inet_ntoa.c]
	new_connection [http_main.c:2235]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 1 byte from 0xeffff59b on the stack.
  * Address 0xeffff59b is 21 bytes below frame pointer in function
new_connection.

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	inet_ntoa      [inet_ntoa.c]
	new_connection [http_main.c:2235]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 1 byte from 0xeffff59a on the stack.
  * Address 0xeffff59a is 22 bytes below frame pointer in function
new_connection.

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	inet_ntoa      [inet_ntoa.c]
	new_connection [http_main.c:2235]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 1 byte from 0xeffff599 on the stack.
  * Address 0xeffff599 is 23 bytes below frame pointer in function
new_connection.

****  Purify instrumented ./httpd (pid 10768)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	inet_ntoa      [inet_ntoa.c]
	new_connection [http_main.c:2235]
	child_main     [http_main.c:2806]
	make_child     [http_main.c:2897]
	startup_children [http_main.c:2957]
	standalone_main [http_main.c:3167]
  * Reading 1 byte from 0xeffff598 on the stack.
  * Address 0xeffff598 is 24 bytes below frame pointer in function
new_connection.

****  Purify instrumented ./httpd (pid 10768)  ****
Current file descriptors in use: 6
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <unknown>
   * Duplication of file descriptor 16.
   * This file descriptor was allocated from:
	_libc_fcntl    [libc.so.1]
	open_logs      [http_log.c:239]
	standalone_main [http_main.c:3134]
	main           [http_main.c:3396]
	_start         [crt1.o]
FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY
   * File info: ?r--r--r--  1 root     root             0 Nov 12  1996
   * This file descriptor was allocated from:
	_libc_open     [libc.so.1]
	_nsc_trydoorcall [libc.so.1]
	getpwnam_r     [libc.so.1]
	uname2id       [util.c:1242]
	set_user       [http_core.c:1068]
	invoke_cmd     [http_config.c:631]
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>

****  Purify instrumented ./httpd (pid 10768)  ****
Purify: Searching for all memory leaks...

Memory leaked: 16 bytes (0.0208%); potentially leaked: 0 bytes (0%)

MLK: 16 bytes leaked at 0x129730
  * This memory was allocated from:
	malloc         [rtlib.o]
	_alloc_attr    [libthread.so.1]
	pthread_mutexattr_init [libthread.so.1]
	accept_mutex_init [http_main.c:366]
	standalone_main [http_main.c:3137]
	main           [http_main.c:3396]

Purify Heap Analysis (combining suppressed and unsuppressed blocks)
                         Blocks      Bytes
              Leaked          1         16
  Potentially Leaked          0          0
              In-Use         59      77038
  ----------------------------------------
     Total Allocated         60      77054

****  Purify instrumented ./httpd (pid 10768)  ****
Thread Summary : 4 threads in existence
  * Thread 0 [main thread]
     Stack: (0xefe00000 0xf0000000), size = 0x200000
  * Thread 1
     Stack: (0xeec0fc78 0xeec0fdec), size = 0x174
  * Thread 2
     Stack: (0xeeff0ab8 0xeeff0b5c), size = 0xa4
  * Thread 3
     Stack: (0xeeb0dbb8 0xeeb0ddec), size = 0x234

****  Purify instrumented ./httpd (pid 10768)  ****
  * Program exited with status code 0.
  * 6 access errors, 174 total occurrences.
  * 16 bytes leaked.
  * 0 bytes potentially leaked.
  * Basic memory usage (including Purify overhead):
      831412 code
      112568 data/bss
      188932 heap (peak use)
        2640 stack
  * Shared library memory usage (including Purify overhead):
       38266 libsocket.so.1_pure_p3_c0_401_551 (shared code)
        2880 libsocket.so.1_pure_p3_c0_401_551 (private data)
      614798 libnsl.so.1_pure_p3_c0_401_551 (shared code)
      116072 libnsl.so.1_pure_p3_c0_401_551 (private data)
        2196 solaris2_threads.so_pure_p3_c0_401_551 (shared code)
        8556 solaris2_threads.so_pure_p3_c0_401_551 (private data)
       13276 libpthread.so.1_pure_p3_c0_401_551 (shared code)
         284 libpthread.so.1_pure_p3_c0_401_551 (private data)
      803733 libc.so.1_pure_p3_c0_401_551 (shared code)
       34752 libc.so.1_pure_p3_c0_401_551 (private data)
        1200 libdl.so.1_pure_p3_c0_401_551 (shared code)
           0 libdl.so.1_pure_p3_c0_401_551 (private data)
        2729 libinternal_stubs.so.1 (shared code)
         208 libinternal_stubs.so.1 (private data)
       15145 libintl.so.1_pure_p3_c0_401_551 (shared code)
        1300 libintl.so.1_pure_p3_c0_401_551 (private data)
       16092 libmp.so.1_pure_p3_c0_401_551 (shared code)
         828 libmp.so.1_pure_p3_c0_401_551 (private data)
       37925 libw.so.1_pure_p3_c0_401_551 (shared code)
        1628 libw.so.1_pure_p3_c0_401_551 (private data)
      120266 libthread.so.1_pure_p3_c0_401_551 (shared code)
       34356 libthread.so.1_pure_p3_c0_401_551 (private data)
  * Memory mapped usage:
     1048576 mmap'd at 0xee402000
     1048576 mmap'd at 0xee504000
     1048576 mmap'd at 0xee606000
     1048576 mmap'd at 0xee708000
     1048576 mmap'd at 0xee80a000
     1048576 mmap'd at 0xee90c000
     1048576 mmap'd at 0xeea0e000
     1048576 mmap'd at 0xeeb10000
        8192 mmap'd at 0xeec50000
        8192 mmap'd at 0xeec60000
        8192 mmap'd PROT_NONE at 0xee400000
        8192 mmap'd PROT_NONE at 0xeeb0e000
        8192 mmap'd PROT_NONE at 0xeea0c000
        8192 mmap'd PROT_NONE at 0xee90a000
        8192 mmap'd PROT_NONE at 0xee808000
        8192 mmap'd PROT_NONE at 0xee706000
        8192 mmap'd PROT_NONE at 0xee604000
        8192 mmap'd PROT_NONE at 0xee502000

>  

Mime
View raw message