httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r663454 - in /httpd/apreq/trunk: CHANGES acinclude.m4 library/parser_multipart.c
Date Thu, 05 Jun 2008 05:35:43 GMT
Author: bojan
Date: Wed Jun  4 22:35:43 2008
New Revision: 663454

URL: http://svn.apache.org/viewvc?rev=663454&view=rev
Log:
Make input brigade volatile in order to give hints to GCC.
Revert -fno-strict-aliasing, which breaks some compilers.

Modified:
    httpd/apreq/trunk/CHANGES
    httpd/apreq/trunk/acinclude.m4
    httpd/apreq/trunk/library/parser_multipart.c

Modified: httpd/apreq/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/CHANGES?rev=663454&r1=663453&r2=663454&view=diff
==============================================================================
--- httpd/apreq/trunk/CHANGES (original)
+++ httpd/apreq/trunk/CHANGES Wed Jun  4 22:35:43 2008
@@ -61,7 +61,7 @@
   Perl upload test (reported by Steve Hay)
 
 - Build [Philip M. Gollucci, Bojan Smojver, joes]
-  add -fno-strict-aliasing to all compiles on all systems
+  make input brigade volatile in order to give hints to GCC
   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193740
   This fixes an infinite look split_on_bdry() of library/parser_multipart.c
   particularly on linux/gcc 4.x platforms.

Modified: httpd/apreq/trunk/acinclude.m4
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/acinclude.m4?rev=663454&r1=663453&r2=663454&view=diff
==============================================================================
--- httpd/apreq/trunk/acinclude.m4 (original)
+++ httpd/apreq/trunk/acinclude.m4 Wed Jun  4 22:35:43 2008
@@ -214,7 +214,6 @@
                       ])
                 # -Wdeclaration-after-statement is only supported on gcc 3.4+
         fi
-        APR_ADDTO([CFLAGS], "-fno-strict-aliasing")
 
         APR_ADDTO([CPPFLAGS], "`$APR_CONFIG --cppflags`")
 

Modified: httpd/apreq/trunk/library/parser_multipart.c
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/library/parser_multipart.c?rev=663454&r1=663453&r2=663454&view=diff
==============================================================================
--- httpd/apreq/trunk/library/parser_multipart.c (original)
+++ httpd/apreq/trunk/library/parser_multipart.c Wed Jun  4 22:35:43 2008
@@ -162,11 +162,18 @@
              * so we can move previous buckets across
              * and retest buf against the full bdry.
              */
+
+            /* give hints to GCC by making the brigade volatile, otherwise the
+             * loop below will end up being endless. See:
+             * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193740
+             */
+            apr_bucket_brigade * volatile in_v = in;
+
             do {
-                apr_bucket *f = APR_BRIGADE_FIRST(in);
+                apr_bucket *f = APR_BRIGADE_FIRST(in_v);
                 APR_BUCKET_REMOVE(f);
                 APR_BRIGADE_INSERT_TAIL(out, f);
-            } while (e != APR_BRIGADE_FIRST(in));
+            } while (e != APR_BRIGADE_FIRST(in_v));
             off = 0;
             goto look_for_boundary_up_front;
         }



Mime
View raw message