X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: jojelino Subject: Re: 1.7.10s 20110729 - problem listing services in /proc Date: Sat, 30 Jul 2011 14:44:15 +0900 Lines: 323 Message-ID: References: <4E3302E5 DOT 6000602 AT acm DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:7.0a2) Gecko/20110729 Thunderbird/7.0a2 In-Reply-To: <4E3302E5.6000602@acm.org> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Starting program: /usr/bin/find /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services -maxdepth 1 -print [New Thread 4648.0xd38] warning: section .gnu_debuglink not found in /cygdrive/d/cygwin/bin/cygwin1.dbg [New Thread 4648.0x16d8] Breakpoint 9, fhandler_base::operator= (this=0x612cab6c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_pty_slave *) 0x612ca914 (gdb) c Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cab6c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_pty_slave *) 0x612ca914 (gdb) c Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cae5c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_pty_slave *) 0x612cab6c (gdb) c Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cb424, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_disk_file *) 0x612cb124 (gdb) c Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; (gdb) disp this->value_name 8: this->value_name = 0x0 (gdb) c Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 1, fhandler_registry::open (this=0x612cb124, flags=0x30c000, mode=0x0) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:824 824 if (flags & O_APPEND) (gdb) disp this->value_name 9: this->value_name = 0x612cb374 L"services" (gdb) c Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cba5c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_registry *) 0x612cb124 (gdb) Continuing. now 0x612cb124->value_name = 0x612cba5c->value_name 0x612cb374 L"services" owner 0x612cba5c not freed value_name Breakpoint 2, fhandler_registry::close (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:856 856 cfree (value_name); (gdb) disp this->value_name 10: this->value_name = 0x612cb374 L"services" (gdb) c Continuing. 0x612cb124->value_name = 0x612cba5c->value_name 0x612cb374 L"services" 0x612cb124 freed value_name. but it was not owner. owner 0x612cba5c not freed value_name Breakpoint 3, fhandler_registry::close (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:860 860 } 10: this->value_name = 0x0 (gdb) Continuing. 0x612cb124->value_name = 0 0x612cba5c->value_name 0x612cb374 L"services" 0x612cb124 freed value_name. but it was not owner. owner 0x612cba5c not freed value_name Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cb124) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cb124, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_registry *) 0x612cba5c (gdb) Continuing. 0x612cb124_2->value_name = 0x612cba5c->value_name 0x612cb374 L"services" (freed but known as not freed) Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cba5c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_registry *) 0x612cb124 (gdb) 0x612cba5c->value_name = 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (freed but known as not freed) Continuing. /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/.NET CLR Data Breakpoint 2, fhandler_registry::close (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:856 856 cfree (value_name); 10: this->value_name = 0x612cb374 L"services" (gdb) Continuing. 0x612cba5c->value_name = 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (freed but known as not freed) 0x612cba5c frees because it is known as not freed. Breakpoint 3, fhandler_registry::close (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:860 860 } 10: this->value_name = 0x0 (gdb) Continuing. 0x612cba5c->value_name = 0 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (double-freed but known as not freed) Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cba5c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_registry *) 0x612cb124 (gdb) Continuing. 0x612cba5c->value_name = 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (double-freed but known as not freed) Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/.NET CLR Networking Breakpoint 2, fhandler_registry::close (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:856 856 cfree (value_name); 10: this->value_name = 0x612cb374 L"services" (gdb) Continuing. 0x612cba5c->value_name = 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (double-freed but known as not freed) 0x612cba5c frees because it is known as not freed. Breakpoint 3, fhandler_registry::close (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:860 860 } 10: this->value_name = 0x0 (gdb) Continuing. 0x612cba5c->value_name = 0 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (triple-freed but known as not freed) Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 9, fhandler_base::operator= (this=0x612cba5c, x=...) at /tmp/winsup/winsup/cygwin/fhandler.cc:42 42 { 4: &x = (fhandler_registry *) 0x612cb124 (gdb) Continuing. This is enough. i skip this one. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. Breakpoint 6, fhandler_registry::fhandler_registry (this=0x612cbd94) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:417 417 prefix_len = sizeof ("registry") - 1; 8: this->value_name = 0x0 (gdb) Continuing. /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/.NET CLR Networking 4.0.0.0 Breakpoint 2, fhandler_registry::close (this=0x612cba5c) at /tmp/winsup/winsup/cygwin/fhandler_registry.cc:856 856 cfree (value_name); 10: this->value_name = 0x612cb374 L"services" (gdb) Continuing. 0x612cba5c->value_name = 0 0x612cb124_2->value_name = 0x612cba5c->value_name = 0x612cb374 L"services" (quadruple-freed but known as not freed) Program received signal SIGSEGV, Segmentation fault. 0x7c80bef7 in RaiseException () from /cygdrive/c/WINDOWS/system32/kernel32.dll In brief, same address quadruple-freed. because of dangling pointer. Regards. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple