1.7.10s 20110729 - problem listing services in /proc

jojelino jojelino@gmail.com
Sat Jul 30 05:44:00 GMT 2011


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



More information about the Cygwin mailing list