[Bug libc/3748] New: Usage of `__libc_once' interface in `sysdeps/posix/getaddrinfo.c'

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3748] New: Usage of `__libc_once' interface in `sysdeps/posix/getaddrinfo.c'

cvs-commit at gcc dot gnu.org
`sysdeps/posix/getaddrinfo.c' contains the following code:

#v+
  2033        /* Read the config file.  */
  2034        __libc_once_define (static, once);
  2035        __typeof (once) old_once = once;
  2036        __libc_once (once, gaiconf_init);
  2037        if (old_once && gaiconf_reload_flag)
  2038          gaiconf_reload ();
#v-

In the `if' statement it is assumed that `old_once' is a scalar value, which
need not be, and that it is zero-initialized by default, which need not be
either, although unlikely.


I will attach a patch with a proposal to fix this issue.

--
           Summary: Usage of `__libc_once' interface in
                    `sysdeps/posix/getaddrinfo.c'
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: tschwinge at gnu dot org
                CC: bug-hurd at gnu dot org,glibc-bugs at sources dot redhat
                    dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3748

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3748] Usage of `__libc_once' interface in `sysdeps/posix/getaddrinfo.c'

cvs-commit at gcc dot gnu.org

------- Additional Comments From tschwinge at gnu dot org  2006-12-18 14:52 -------
Created an attachment (id=1465)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1465&action=view)
Proposed patch.


--


http://sourceware.org/bugzilla/show_bug.cgi?id=3748

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3748] Usage of `__libc_once' interface in `sysdeps/posix/getaddrinfo.c'

cvs-commit at gcc dot gnu.org
In reply to this post by cvs-commit at gcc dot gnu.org

------- Additional Comments From drepper at redhat dot com  2006-12-18 15:11 -------
old_once is scalar and is zero initialized.  Who do you think you are to decide
that this is not the case?

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=3748

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.