Minor tweak to the m68k patch.

This commit is contained in:
Philip.Hazel 2018-02-28 09:03:12 +00:00
parent dbb53b3585
commit 26edb6cb43
1 changed files with 8 additions and 7 deletions

View File

@ -796,11 +796,12 @@ typedef struct heapframe {
/* At this point, the structure is 16-bit aligned. On most architectures
the alignment requirement for a pointer will ensure that the eptr field below
is 32-bit or 64-bit aligned. However, on m68k it is fine to have a pointer
that is 16-bit aligned. We must therefore ensure that the occu vector is an
odd multiple of 16 bits so as to get back into 32-bit alignment. This happens
naturally when PCRE2_UCHAR is 8 bits wide, but needs fudges in the other
cases. Without these, this structure is no longer a multiple of PCRE2_SIZE
and the check below fails. */
that is 16-bit aligned. We must therefore ensure that what comes between here
and eptr is an odd multiple of 16 bits so as to get back into 32-bit
alignment. This happens naturally when PCRE2_UCHAR is 8 bits wide, but needs
fudges in the other cases. In the 32-bit case the padding comes first so that
the occu field itself is 32-bit aligned. Without the padding, this structure
is no longer a multiple of PCRE2_SIZE on m68k, and the check below fails. */
#if PCRE2_CODE_UNIT_WIDTH == 8
PCRE2_UCHAR occu[6]; /* Used for other case code units */
@ -808,8 +809,8 @@ typedef struct heapframe {
PCRE2_UCHAR occu[2]; /* Used for other case code units */
uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
#else
PCRE2_UCHAR occu[1]; /* Used for other case code units */
uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
PCRE2_UCHAR occu[1]; /* Used for other case code units */
#endif
/* The rest have to be copied from the previous frame whenever a new frame
@ -829,7 +830,7 @@ typedef struct heapframe {
PCRE2_SIZE ovector[131072]; /* Must be last in the structure */
} heapframe;
/* This typedef is a check that the size of the heapframe structure is a
/* This typedef is a check that the size of the heapframe structure is a
multiple of PCRE2_SIZE. See various comments above. */
typedef char check_heapframe_size[