Re: Endless loop in split_on_bdry() of library/parser_multipart.c?

2008-06-04 Thread Bojan Smojver
I propose we fix this as attached. I tested this on Fedora 9 and it
works OK. Opinions?

-- 
Bojan
Index: library/parser_multipart.c
===
--- library/parser_multipart.c	(revision 663420)
+++ library/parser_multipart.c	(working copy)
@@ -162,11 +162,13 @@
  * so we can move previous buckets across
  * and retest buf against the full bdry.
  */
+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;
 }
Index: acinclude.m4
===
--- acinclude.m4	(revision 663420)
+++ acinclude.m4	(working copy)
@@ -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`)
 


Re: Endless loop in split_on_bdry() of library/parser_multipart.c?

2008-06-04 Thread Joe Schaefer

--- Bojan Smojver [EMAIL PROTECTED] wrote:

 I propose we fix this as attached. I tested this on
 Fedora 9 and it
 works OK. Opinions?

Needs a comment in the source about why we're using
volatile here, but otherwise +1.