httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: 2.4.17 alignment issue sparc/ia64
Date Fri, 16 Oct 2015 11:54:12 GMT
On Fri, Oct 16, 2015 at 10:02 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
>
> We should do something like the following patch:
>
> Index: server/scoreboard.c
> ===================================================================
> --- server/scoreboard.c    (revision 1708095)
> +++ server/scoreboard.c    (working copy)
> @@ -129,14 +129,19 @@ static apr_status_t ap_cleanup_shared_mem(void *d)
>      return APR_SUCCESS;
>  }
>
> +#define SIZE_OF_scoreboard    APR_ALIGN_DEFAULT(sizeof(scoreboard))
> +#define SIZE_OF_global_score  APR_ALIGN_DEFAULT(sizeof(global_score))
> +#define SIZE_OF_process_score APR_ALIGN_DEFAULT(sizeof(process_score))
> +#define SIZE_OF_worker_score  APR_ALIGN_DEFAULT(sizeof(worker_score))

Maybe the following would be more correct:

+#define SCOREBOARD_ALIGN(size) APR_ALIGN((size),sizeof(void *))
+#define SIZE_OF_scoreboard     SCOREBOARD_ALIGN(sizeof(scoreboard))
+#define SIZE_OF_global_score   SCOREBOARD_ALIGN(sizeof(global_score))
+#define SIZE_OF_process_score  SCOREBOARD_ALIGN(sizeof(process_score))
+#define SIZE_OF_worker_score   SCOREBOARD_ALIGN(sizeof(worker_score))

since APR_ALIGN_DEFAULT seems to align to 8 bytes whatever the
platform requires...

Maybe some APR_ALIGN_NATIVE macro is missing in APR, like:
#define APR_ALIGN_NATIVE(size) APR_ALIGN((size), APR_SIZEOF_VOIDP)
but that's another story :)

Mime
View raw message