Re: [pcre-dev] Version 8.30 is released

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] Version 8.30 is released
I was having trouble applying the patch, so I instead downloaded
revision 913 of pcre_exec.c revision from
<http://www.exim.org/viewvc/pcre/code/trunk>

The "unary" warning was eliminated during the build, but "pcretest -m
-C" produced identical output before and after the change:

*PCRE version 8.30 2012-02-04
Compiled with
8-bit support only
UTF-8 support
Unicode properties support
Just-in-time compiler support: x86 32bit (little endian + unaligned)
Newline sequence is ANYCRLF
\R matches CR, LF, or CRLF only
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses heap: frame size = 300 bytes

I've just discovered that 8.30 doesn't work at all with the software for
which I build PCRE. The programmer abandoned the project a few months
ago and did not release the source.

It works with PCRE 8.21.

With PCRE 8.30 I immediately get this error:
*
---------------------------
regex plugin
---------------------------
Couldn't locate pcre functions
---------------------------
OK
---------------------------

I guess it might be due to removal of pcre_info. I don't think it
actually used the function, but likely imports or defines all previously
exported functions. I'm not a programmer but if there's a way to stick a
dummy function in there to try, please let me know.

Regards,
Sheri

On 2/12/2012 12:14 PM, Philip Hazel wrote:
> On Sat, 4 Feb 2012, Sheri wrote:
>
>> Following are the 13 warnings that appeared during the build:
>>
>> C:\pcre-8.30\pcre-8.30\pcre_exec.c(6216) : warning C4146: unary minus operator
>> applied to unsigned type, result still unsigned
> I have applied the following patch in an attempt to fix this issue in
> pcre_exec.c. I can't test it, because my compiler does not complain
> about the use of -sizeof(xxx). (It presumably auto-casts it. It
> definitely returns a negative number.)
>
> Index: pcre_exec.c
> ===================================================================
> --- pcre_exec.c (revision 911)
> +++ pcre_exec.c (working copy)
> @@ -6208,12 +6208,14 @@
> const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
>
> /* Check for the special magic call that measures the size of the stack used
> -per recursive call of match(). */
> +per recursive call of match(). Without the funny casting for sizeof, a Windows
> +compiler gave this error: "unary minus operator applied to unsigned type,
> +result still unsigned". Hopefully the cast fixes that. */
>
>   if (re == NULL&&  extra_data == NULL&&  subject == NULL&&  length == -999&&
>       start_offset == -999)
>   #ifdef NO_RECURSE
> -  return -sizeof(heapframe);
> +  return -((int)sizeof(heapframe));
>   #else
>     return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
>   #endif

>
>
> ===================================================================
>
> Please can you run the command "pcretest -m -C" before and after
> applying the patch. I expect the output to be different.
>
> The other warnings are all in the JIT code -- Zoltán, did you fix these
> with your latest patches?
>
>> C:\pcre-8.30\pcre-8.30\pcre_jit_compile.c(6507) : warning C4244: 'function' :
>> conversion from 'const unsigned short ' to 'unsigned char ', possible loss of
>> data
>> C:\pcre-8.30\pcre-8.30\pcre_jit_compile.c(6514) : warning C4244: 'function' :
>> conversion from 'const unsigned short ' to 'unsigned char ', possible loss of
>> data
>> C:\pcre-8.30\pcre-8.30\pcre_jit_compile.c(6507) : warning C4761: integral size
>> mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\pcre_jit_compile.c(6514) : warning C4761: integral size
>> mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\sljit/sljitNativeX86_32.c(145) : warning C4761:
>> integral size mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\sljit/sljitNativeX86_common.c(497) : warning C4761:
>> integral size mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\sljit/sljitNativeX86_common.c(705) : warning C4761:
>> integral size mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\sljit/sljitNativeX86_common.c(845) : warning C4761:
>> integral size mismatch in argument; conversion supplied
>> C:\pcre-8.30\pcre-8.30\pcre_jit_test.c(700) : warning C4090: 'function'
>> : different 'const' qualifiers
>> C:\pcre-8.30\pcre-8.30\pcre_jit_test.c(700) : warning C4022: 'pcre_fullinfo' :
>> pointer mismatch for actual parameter 4
>> C:\pcre-8.30\pcre-8.30\pcre_jit_test.c(894) : warning C4090: 'function'
>> : different 'const' qualifiers
>> C:\pcre-8.30\pcre-8.30\pcre_jit_test.c(894) : warning C4022: 'pcre_config' :
>> pointer mismatch for actual parameter 2
>
> Philip
>