| 672 |
/* The purpose of this function to allow valgrind |
/* The purpose of this function to allow valgrind |
| 673 |
for reporting invalid reads and writes. */ |
for reporting invalid reads and writes. */ |
| 674 |
static unsigned char *tables_copy; |
static unsigned char *tables_copy; |
|
pcre *regex; |
|
| 675 |
const char *errorptr; |
const char *errorptr; |
| 676 |
int erroroffset; |
int erroroffset; |
| 677 |
const unsigned char *default_tables; |
const unsigned char *default_tables; |
| 678 |
#ifdef SUPPORT_PCRE8 |
#ifdef SUPPORT_PCRE8 |
| 679 |
|
pcre *regex; |
| 680 |
char null_str[1] = { 0 }; |
char null_str[1] = { 0 }; |
| 681 |
#else |
#else |
| 682 |
|
pcre16 *regex; |
| 683 |
PCRE_SCHAR16 null_str[1] = { 0 }; |
PCRE_SCHAR16 null_str[1] = { 0 }; |
| 684 |
#endif |
#endif |
| 685 |
|
|
| 721 |
return tables_copy; |
return tables_copy; |
| 722 |
} |
} |
| 723 |
|
|
| 724 |
static pcre_jit_stack* callback(void *arg) |
static pcre_jit_stack* callback8(void *arg) |
| 725 |
{ |
{ |
| 726 |
return (pcre_jit_stack *)arg; |
return (pcre_jit_stack *)arg; |
| 727 |
} |
} |
| 728 |
|
|
| 729 |
|
static pcre16_jit_stack* callback16(void *arg) |
| 730 |
|
{ |
| 731 |
|
return (pcre16_jit_stack *)arg; |
| 732 |
|
} |
| 733 |
|
|
| 734 |
#ifdef SUPPORT_PCRE8 |
#ifdef SUPPORT_PCRE8 |
| 735 |
static void setstack8(pcre_extra *extra) |
static void setstack8(pcre_extra *extra) |
| 736 |
{ |
{ |
| 746 |
if (!stack) |
if (!stack) |
| 747 |
stack = pcre_jit_stack_alloc(1, 1024 * 1024); |
stack = pcre_jit_stack_alloc(1, 1024 * 1024); |
| 748 |
/* Extra can be NULL. */ |
/* Extra can be NULL. */ |
| 749 |
pcre_assign_jit_stack(extra, callback, stack); |
pcre_assign_jit_stack(extra, callback8, stack); |
| 750 |
} |
} |
| 751 |
#endif /* SUPPORT_PCRE8 */ |
#endif /* SUPPORT_PCRE8 */ |
| 752 |
|
|
| 753 |
#ifdef SUPPORT_PCRE16 |
#ifdef SUPPORT_PCRE16 |
| 754 |
static void setstack16(pcre16_extra *extra) |
static void setstack16(pcre16_extra *extra) |
| 755 |
{ |
{ |
| 756 |
static pcre_jit_stack *stack; |
static pcre16_jit_stack *stack; |
| 757 |
|
|
| 758 |
if (!extra) { |
if (!extra) { |
| 759 |
if (stack) |
if (stack) |
| 765 |
if (!stack) |
if (!stack) |
| 766 |
stack = pcre16_jit_stack_alloc(1, 1024 * 1024); |
stack = pcre16_jit_stack_alloc(1, 1024 * 1024); |
| 767 |
/* Extra can be NULL. */ |
/* Extra can be NULL. */ |
| 768 |
pcre16_assign_jit_stack(extra, callback, stack); |
pcre16_assign_jit_stack(extra, callback16, stack); |
| 769 |
} |
} |
| 770 |
#endif /* SUPPORT_PCRE8 */ |
#endif /* SUPPORT_PCRE8 */ |
| 771 |
|
|
| 871 |
int disabled_flags8 = 0; |
int disabled_flags8 = 0; |
| 872 |
#endif |
#endif |
| 873 |
#ifdef SUPPORT_PCRE16 |
#ifdef SUPPORT_PCRE16 |
| 874 |
pcre *re16; |
pcre16 *re16; |
| 875 |
pcre16_extra *extra16; |
pcre16_extra *extra16; |
| 876 |
int ovector16_1[32]; |
int ovector16_1[32]; |
| 877 |
int ovector16_2[32]; |
int ovector16_2[32]; |