public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
       [not found] <bug-5070-131@http.sourceware.org/bugzilla/>
@ 2014-02-16 19:35 ` jackie.rosen at hushmail dot com
  2014-05-28 19:45 ` schwab at sourceware dot org
  2023-10-28 17:09 ` gabravier at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 19:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=5070

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #9 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
       [not found] <bug-5070-131@http.sourceware.org/bugzilla/>
  2014-02-16 19:35 ` [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails jackie.rosen at hushmail dot com
@ 2014-05-28 19:45 ` schwab at sourceware dot org
  2023-10-28 17:09 ` gabravier at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:45 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=5070

Andreas Schwab <schwab at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jackie.rosen at hushmail dot com   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
       [not found] <bug-5070-131@http.sourceware.org/bugzilla/>
  2014-02-16 19:35 ` [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails jackie.rosen at hushmail dot com
  2014-05-28 19:45 ` schwab at sourceware dot org
@ 2023-10-28 17:09 ` gabravier at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: gabravier at gmail dot com @ 2023-10-28 17:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=5070

Gabriel Ravier <gabravier at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gabravier at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
  2007-09-26  9:40 [Bug libc/5070] New: " thunter at erggroup dot com
                   ` (2 preceding siblings ...)
  2007-10-05 23:42 ` ikalvachev at gmail dot com
@ 2009-03-18 12:20 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-18 12:20 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jsm28 at gcc dot gnu dot org  2009-03-18 12:20 -------
I believe this was fixed by:

2008-04-21  Daniel Jacobowitz  <dan@codesourcery.com>

        * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic
        version.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


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

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
  2007-09-26  9:40 [Bug libc/5070] New: " thunter at erggroup dot com
  2007-10-03  6:14 ` [Bug ports/5070] " drepper at redhat dot com
  2007-10-03 12:11 ` jsm28 at gcc dot gnu dot org
@ 2007-10-05 23:42 ` ikalvachev at gmail dot com
  2009-03-18 12:20 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: ikalvachev at gmail dot com @ 2007-10-05 23:42 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ikalvachev at gmail dot com  2007-10-05 23:42 -------
If I understand correctly, the bug is that the arm aligns to 8 bytes, not 4.
This causes bigger align, that is not properly cleared but still would be send
over the network.

Instead of arguing how to clear the padding set by the compiler, I think it
would be much better to not send it at all. There is simple portable way to get
the size of the whole structure without padding and it is already used in the
assert().

Using offsetof(struct req,pad) instead of sizeof(req) would always give us the
correct size of the structure without the padding. It would still require at
least one byte padding (that we can ignore).


This solution is not only more portable, it is also faster.
And this is what I care about 
(I've never touched arm so far).


Here is sample patch against glibc 2.6.1, it applies without problems to current
cvs HEAD r1.12.

---------
--- check_pf.c.old      2007-04-25 19:05:18.000000000 +0300
+++ check_pf.c  2007-10-06 00:54:45.000000000 +0300
@@ -53,21 +53,18 @@ make_request (int fd, pid_t pid, bool *s
     struct rtgenmsg g;
     /* struct rtgenmsg consists of a single byte.  This means there
        are three bytes of padding included in the REQ definition.
-       We make them explicit here.  */
-    char pad[3];
+       We use pad as a mark for the size of the data we need.  */
+    char pad;
   } req;
   struct sockaddr_nl nladdr;
 
-  req.nlh.nlmsg_len = sizeof (req);
+  req.nlh.nlmsg_len = offsetof (struct req, pad);
   req.nlh.nlmsg_type = RTM_GETADDR;
   req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
   req.nlh.nlmsg_pid = 0;
   req.nlh.nlmsg_seq = time (NULL);
   req.g.rtgen_family = AF_UNSPEC;
 
-  assert (sizeof (req) - offsetof (struct req, pad) == 3);
-  memset (req.pad, '\0', sizeof (req.pad));
-
   memset (&nladdr, '\0', sizeof (nladdr));
   nladdr.nl_family = AF_NETLINK;
 
@@ -94,7 +91,7 @@ make_request (int fd, pid_t pid, bool *s
 
   struct iovec iov = { buf, buf_size };
 
-  if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
+  if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, offsetof (struct req,
pad), 0,
                                    (struct sockaddr *) &nladdr,
                                    sizeof (nladdr))) < 0)
     goto out_fail;
---------

Thank you for your patience.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
  2007-09-26  9:40 [Bug libc/5070] New: " thunter at erggroup dot com
  2007-10-03  6:14 ` [Bug ports/5070] " drepper at redhat dot com
@ 2007-10-03 12:11 ` jsm28 at gcc dot gnu dot org
  2007-10-05 23:42 ` ikalvachev at gmail dot com
  2009-03-18 12:20 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2007-10-03 12:11 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jsm28 at gcc dot gnu dot org  2007-10-03 12:10 -------
The file already exists in ports, since:

2007-01-08  Daniel Jacobowitz  <dan@codesourcery.com>

        * sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
        * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file.

(The issue only applies for old-ABI, EABI does not have this ABI peculiarity so
the EABI version just includes the generic one.)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


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

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
  2007-09-26  9:40 [Bug libc/5070] New: " thunter at erggroup dot com
@ 2007-10-03  6:14 ` drepper at redhat dot com
  2007-10-03 12:11 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2007-10-03  6:14 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2007-10-03 06:13 -------
This has nothing to do with "x86 only".  All ABIs designed by people who have a
bit of understanding require no change.  Any change will negatively impact well
designed architectures for the sole benefit of this embedded crap.  But your own
version of the file in the add-on.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libc                        |ports


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

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-28 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-5070-131@http.sourceware.org/bugzilla/>
2014-02-16 19:35 ` [Bug ports/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails jackie.rosen at hushmail dot com
2014-05-28 19:45 ` schwab at sourceware dot org
2023-10-28 17:09 ` gabravier at gmail dot com
2007-09-26  9:40 [Bug libc/5070] New: " thunter at erggroup dot com
2007-10-03  6:14 ` [Bug ports/5070] " drepper at redhat dot com
2007-10-03 12:11 ` jsm28 at gcc dot gnu dot org
2007-10-05 23:42 ` ikalvachev at gmail dot com
2009-03-18 12:20 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).