Commit 5c1241bb authored by Joe Orton's avatar Joe Orton
Browse files

* modules/ssl/ssl_scache_shmcb.c (shmcb_safe_clear): Mark with

"noinline" attribute for GCC > 3.

PR: 38838


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@382799 13f79535-47bb-0310-9956-ffa450edef68
parent 18d98b31
Loading
Loading
Loading
Loading
+7 −2
Changes for modules/ssl/ssl_scache_shmcb.c: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -234,8 +234,13 @@ static void shmcb_set_safe_time_ex(unsigned char *, const unsigned char *);
                        (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);