diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-10-21 01:00:08 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-10-21 01:00:09 +0200 |
commit | 7a252ac46780b6145084d8d5ca0549b2de3639cc (patch) | |
tree | e8a938a26fb610e0eaba62dcf185b2e361f01951 /src/3rdparty/pcre2/src/pcre2_intmodedep.h | |
parent | 10b8ed816d0dff4321d5a8b0723a8090b2058678 (diff) | |
parent | 2708c6c11d685ab25c12d558961d924c9a4533d2 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Iaf28977e7ecf566b28b9406dcb005d48621169c2
Diffstat (limited to 'src/3rdparty/pcre2/src/pcre2_intmodedep.h')
-rw-r--r-- | src/3rdparty/pcre2/src/pcre2_intmodedep.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/3rdparty/pcre2/src/pcre2_intmodedep.h b/src/3rdparty/pcre2/src/pcre2_intmodedep.h index c4c4c3adb9..62626d0a8a 100644 --- a/src/3rdparty/pcre2/src/pcre2_intmodedep.h +++ b/src/3rdparty/pcre2/src/pcre2_intmodedep.h @@ -793,11 +793,23 @@ typedef struct heapframe { uint8_t return_id; /* Where to go on in internal "return" */ uint8_t op; /* Processing opcode */ + /* 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 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 */ #elif PCRE2_CODE_UNIT_WIDTH == 16 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 */ #endif @@ -818,6 +830,9 @@ 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 +multiple of PCRE2_SIZE. See various comments above. */ + typedef char check_heapframe_size[ ((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0)? (+1):(-1)]; @@ -881,6 +896,8 @@ typedef struct dfa_match_block { PCRE2_SPTR last_used_ptr; /* Latest consulted character */ const uint8_t *tables; /* Character tables */ PCRE2_SIZE start_offset; /* The start offset value */ + PCRE2_SIZE heap_limit; /* As it says */ + PCRE2_SIZE heap_used; /* As it says */ uint32_t match_limit; /* As it says */ uint32_t match_limit_depth; /* As it says */ uint32_t match_call_count; /* Number of calls of internal function */ |