Re: [PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-15 Thread Olivier Houchard
On Thu, Nov 15, 2018 at 02:26:59PM +0100, Willy Tarreau wrote: > On Thu, Nov 15, 2018 at 11:58:36AM +0100, Olivier Houchard wrote: > > Willy, can you push the attached patch ? > > Applied, thanks. I've just slightly edited it to put parenthesis around > "i" below : > > > +#define

Re: [PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-15 Thread Willy Tarreau
On Thu, Nov 15, 2018 at 11:58:36AM +0100, Olivier Houchard wrote: > Willy, can you push the attached patch ? Applied, thanks. I've just slightly edited it to put parenthesis around "i" below : > +#define round_ptr_size(i) ((i + (sizeof(void *) - 1)) &~ (sizeof(void *) - > 1)) so that if

Re: [PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-15 Thread Olivier Houchard
On Thu, Nov 15, 2018 at 09:48:20AM +, Paul Martin wrote: > On Wed, Nov 14, 2018 at 06:05:00PM +0100, Olivier Houchard wrote: > > > Oops, you're right indeed. > > I'm not sure I'm a big fan of special-casing STD_T_UINT. For example, > > STD_T_FRQP is probably 12bytes too, so it'd be a problem.

Re: [PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-15 Thread Paul Martin
On Wed, Nov 14, 2018 at 06:05:00PM +0100, Olivier Houchard wrote: > Oops, you're right indeed. > I'm not sure I'm a big fan of special-casing STD_T_UINT. For example, > STD_T_FRQP is probably 12bytes too, so it'd be a problem. > Can you test the (untested, but hopefully right) patch attached ?

Re: [PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-14 Thread Olivier Houchard
Hi Paul, On Wed, Nov 14, 2018 at 03:33:02PM +, Paul Martin wrote: > Atomic operations on aarch64 (arm64) have to be aligned to 8 byte > boundaries (same size as a pointer type), otherwise a SIGBUS is raised. > > Because the variable ts here isn't guaranteed to be aligned due to the > various

[PATCH] BUG/CRITICAL: SIGBUS crash on aarch64

2018-11-14 Thread Paul Martin
Atomic operations on aarch64 (arm64) have to be aligned to 8 byte boundaries (same size as a pointer type), otherwise a SIGBUS is raised. Because the variable ts here isn't guaranteed to be aligned due to the various data_size adjustments, make sure that data_size is always incremented by a