Hi Ralf,
this is quite interesting. Am I see right, that your pattern only contains two fixed characters (backslash and space)? On a 32 bit Linux system, in 8 bit mode, that is 67 bytes long (56 bytes for header, 11 for pattern) instead of 69. That read access reads byte 63, which is perfect.
This is the interesting part:
size = sizeof(REAL_PCRE) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);
Could you print sizeof(REAL_PCRE), length, and size here?
Regards,
Zoltan
Ralf Junker <ralfjunker@???> írta:
>I am seeing an access violation and programm crash running the following>
script in pcretest, Win32:>
>
/\Q\ \E/S++>
\x{20}\P>
>
Can someone reproduce my findings?>
>
Win64 works fine, by the way.>
>
Ralf>
>
---------->
>
Error 00001. 0x130610 (Thread 0x0EC8):>
Access overrun: Attempt to access 2 byte(s) at 0x020B7108+268482618, that is>
at offset 56+268482618 in heap block 0x020B70D0 which is only 69 bytes>
long.>
| pcre_jit_compile.c line 2915:>
|>
| /* We do not support alternatives now. */>
|>if (*(common->start + GET(common->start, 1)) == OP_ALT)>
| return FALSE;>
|>
Call Tree:>
0x00467850(=pcretest.exe:0x01:066850) pcre_jit_compile.c#2915>
0x0053D08B(=pcretest.exe:0x01:13C08B) pcre_jit_compile.c#9127>
0x00543081(=pcretest.exe:0x01:142081) pcre_study.c#1506>
0x00550150(=pcretest.exe:0x01:14F150) pcretest.c#3976>
0x005621EB(=pcretest.exe:0x01:1611EB)>
>
The memory block (0x020B70D0) [size: 69 bytes] was allocated with malloc>
| pcre_compile.c line 8097:>
|>
| size = sizeof(REAL_PCRE) + (length + cd->names_found *>
cd->name_entry_size) * sizeof(pcre_uchar);>
|>re = (REAL_PCRE *)(PUBL(malloc))(size);>
|>
| if (re == NULL)>
Call Tree:>
0x004E2212(=pcretest.exe:0x01:0E1212) pcre_compile.c#8097>
0x004E1661(=pcretest.exe:0x01:0E0661) pcre_compile.c#7744>
0x0054FDB3(=pcretest.exe:0x01:14EDB3) pcretest.c#3885>
0x005621EB(=pcretest.exe:0x01:1611EB)>
>
------------------------------------------>
Error 00002. 0x400000 (r) (Thread 0x0EC8):>
Exception 0xC0000005: Access violation at 0x120C2942.>
| pcre_jit_compile.c line 2915:>
|>
| /* We do not support alternatives now. */>
|>if (*(common->start + GET(common->start, 1)) == OP_ALT)>
| return FALSE;>
|>
Call Tree:>
0x00467850(=pcretest.exe:0x01:066850) pcre_jit_compile.c#2915>
0x0053D08B(=pcretest.exe:0x01:13C08B) pcre_jit_compile.c#9127>
0x00543081(=pcretest.exe:0x01:142081) pcre_study.c#1506>
0x00550150(=pcretest.exe:0x01:14F150) pcretest.c#3976>
0x005621EB(=pcretest.exe:0x01:1611EB)>
>
-- >
## List details at
https://lists.exim.org/mailman/listinfo/pcre-dev >