httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r390405 - in /httpd/httpd/branches/2.2.x: CHANGES modules/ssl/ssl_scache_shmcb.c
Date Fri, 31 Mar 2006 12:25:28 GMT
Author: jorton
Date: Fri Mar 31 04:25:25 2006
New Revision: 390405

URL: http://svn.apache.org/viewcvs?rev=390405&view=rev
Log:
Merge r382799 from trunk:

* modules/ssl/ssl_scache_shmcb.c (shmcb_safe_clear): Mark with
"noinline" attribute for GCC > 3.

PR: 38838
Reviewed by: jorton, rpluem, pquerna

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/ssl/ssl_scache_shmcb.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/CHANGES?rev=390405&r1=390404&r2=390405&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Fri Mar 31 04:25:25 2006
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.1
 
+  *) mod_ssl: Fix possible crashes in shmcb with gcc 4 on platforms
+     requiring word-aligned pointers.  PR 38838.  [Joe Orton]
+
   *) mod_proxy: If we get an error reading the upstream response,
      close the connection.  [Justin Erenkrantz, Roy T. Fielding,
      Jim Jagielski, Ruediger Pluem]

Modified: httpd/httpd/branches/2.2.x/modules/ssl/ssl_scache_shmcb.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/ssl/ssl_scache_shmcb.c?rev=390405&r1=390404&r2=390405&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ssl/ssl_scache_shmcb.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ssl/ssl_scache_shmcb.c Fri Mar 31 04:25:25 2006
@@ -234,8 +234,13 @@
                         (const unsigned char *)(&tmp_time)); \
         } while(0)
 
-/* This is necessary simply so that the size passed to memset() is not a
- * compile-time constant, preventing the compiler from optimising it. */
+/* This is used to persuade the compiler from using an inline memset()
+ * which has no respect for alignment, since the size parameter is
+ * often a compile-time constant.  GCC >= 4 will aggressively inline
+ * static functions, so it's marked as explicitly not-inline. */
+#if defined(__GNUC__) && __GNUC__ > 3
+__attribute__((__noinline__))
+#endif
 static void shmcb_safe_clear(void *ptr, size_t size)
 {
         memset(ptr, 0, size);



Mime
View raw message