public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled at -O3
Date: Mon, 29 Nov 2010 13:34:00 -0000	[thread overview]
Message-ID: <bug-46488-4-mXqrvNjOHx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46488-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46488

--- Comment #22 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 12:09:30 UTC ---
> The pointers are constructed explicitly to never be dereferenced, only
> compared for equality; if a dereference exists it would be a bug, but
> I don't see one.

APR_RING_SPLICE_HEAD does such a dereference as far I can see:

#define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link)            \
    APR_RING_SPLICE_AFTER(APR_RING_SENTINEL((hp), elem, link),    \
                 (ep1), (epN), link)

#define APR_RING_SPLICE_AFTER(lep, ep1, epN, link) do {            \
    APR_RING_PREV((ep1), link) = (lep);                \
    APR_RING_NEXT((epN), link) = APR_RING_NEXT((lep), link);    \
    APR_RING_PREV(APR_RING_NEXT((lep), link), link) = (epN);    \
    APR_RING_NEXT((lep), link) = (ep1);                \
    } while (0)

#define APR_RING_NEXT(ep, link)    (ep)->link.next
#define APR_RING_PREV(ep, link)    (ep)->link.prev

> In the absence of such a smoking gun, can an C99 aliasing issue occur merely
> in handling pointer equivalence?

That would be a real compiler bug. :-)


You seem to be quite familiar with the httpd code.  Can you pinpoint what is
miscompiled exactly in ap_core_input_filter or ap_core_output_filter?  I'm not
saying that the miscompilation comes from this strict aliasing issue, only that
it might at this point.


  parent reply	other threads:[~2010-11-29 12:10 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 18:55 [Bug c/46488] New: server/core_filters.c from apache httpd 2.2.17 does not produce good code with optimizations (-O) used on Solaris Sparc 64-bit lk0946 at att dot com
2010-11-16  8:37 ` [Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled with optimization ebotcazou at gcc dot gnu.org
2010-11-16 16:48 ` lk0946 at att dot com
2010-11-16 16:55 ` lk0946 at att dot com
2010-11-16 17:16 ` ebotcazou at gcc dot gnu.org
2010-11-17  0:10 ` lk0946 at att dot com
2010-11-17  0:31 ` ebotcazou at gcc dot gnu.org
2010-11-17  6:43 ` lk0946 at att dot com
2010-11-17  7:44 ` ebotcazou at gcc dot gnu.org
2010-11-25 16:06 ` rguenth at gcc dot gnu.org
2010-11-25 16:58 ` ebotcazou at gcc dot gnu.org
2010-11-26 22:34 ` lk0946 at att dot com
2010-11-26 23:09 ` [Bug middle-end/46488] server/core_filters.c from apache httpd 2.2.17 miscompiled with optimization -O3 rguenth at gcc dot gnu.org
2010-11-27  0:12 ` lk0946 at att dot com
2010-11-27 14:11 ` ebotcazou at gcc dot gnu.org
2010-11-27 23:59 ` LpSolit at netscape dot net
2010-11-28  9:49 ` [Bug middle-end/46488] [4.5 regression] server/core_filters.c from apache httpd 2.2.17 miscompiled at -O3 ebotcazou at gcc dot gnu.org
2010-11-28 13:22 ` ebotcazou at gcc dot gnu.org
2010-11-28 14:33 ` ebotcazou at gcc dot gnu.org
2010-11-29 11:05 ` jorton at redhat dot com
2010-11-29 11:59 ` ebotcazou at gcc dot gnu.org
2010-11-29 12:10 ` jorton at redhat dot com
2010-11-29 13:34 ` ebotcazou at gcc dot gnu.org [this message]
2010-11-29 14:03 ` rguenth at gcc dot gnu.org
2010-11-29 14:07 ` rguenth at gcc dot gnu.org
2010-11-29 14:31 ` jorton at redhat dot com
2010-11-29 14:41 ` rguenther at suse dot de
2010-11-29 21:39 ` pcpa at mandriva dot com.br
2010-11-30  7:47 ` ebotcazou at gcc dot gnu.org
2010-11-30 10:00 ` ebotcazou at gcc dot gnu.org
2010-11-30 10:57 ` rguenth at gcc dot gnu.org
2010-11-30 13:14 ` ebotcazou at gcc dot gnu.org
2010-11-30 15:18 ` ebotcazou at gcc dot gnu.org
2010-11-30 15:47 ` rguenther at suse dot de
2010-11-30 23:43 ` pcpa at mandriva dot com.br
2010-11-30 23:52 ` ebotcazou at gcc dot gnu.org
2010-12-01 10:13 ` rguenther at suse dot de
2010-12-01 12:15 ` ebotcazou at gcc dot gnu.org
2010-12-01 18:23 ` pcpa at mandriva dot com.br
2010-12-01 18:26 ` pcpa at mandriva dot com.br
2010-12-01 18:56 ` ebotcazou at gcc dot gnu.org
2010-12-01 21:54 ` ebotcazou at gcc dot gnu.org
2010-12-01 22:15 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46488-4-mXqrvNjOHx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).