Revision: 925
http://www.exim.org/viewvc/pcre2?view=rev&revision=925
Author: ph10
Date: 2018-02-28 09:03:12 +0000 (Wed, 28 Feb 2018)
Log Message:
-----------
Minor tweak to the m68k patch.
Modified Paths:
--------------
code/trunk/src/pcre2_intmodedep.h
Modified: code/trunk/src/pcre2_intmodedep.h
===================================================================
--- code/trunk/src/pcre2_intmodedep.h 2018-02-27 17:19:51 UTC (rev 924)
+++ code/trunk/src/pcre2_intmodedep.h 2018-02-28 09:03:12 UTC (rev 925)
@@ -796,11 +796,12 @@
/* 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 @@
PCRE2_UCHAR occu[2]; /* Used for other case code units */
uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
#else
+ uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
PCRE2_UCHAR occu[1]; /* Used for other case code units */
- uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
#endif
/* The rest have to be copied from the previous frame whenever a new frame
@@ -829,7 +830,7 @@
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[