Autor: Ralf Junker Data: CC: pcre-dev Assunto: Re: [pcre-dev] pcre_fullinfo with PCRE_INFO_JITSIZE fails with SVN
921
On 20.02.2012 09:55, Zoltán Herczeg wrote:
> pcre_jit_compile.c:7146
>
> return ((executable_functions
> *)executable_funcs)->executable_sizes[PCRE_STUDY_JIT_COMPILE];
>
> PCRE_STUDY_JIT_COMPILE should be JIT_COMPILE
Thanks, this fixes it.
> However, since now we have 3 code sizes, perhaps we should rethink
> the returned values for pcre_full_info()
>
> 1) Handling out-of-memory situations: What should happen if some (not
> all) compilation phase is failed because out-of-memory was occured.
> For example study is called with PCRE_STUDY_JIT_COMPILE and
> PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE and only the first one is
> successful because there is not enough memory for the second
> compilation. At the moment we return with a successful compilation,
> although the hard partial matching will be done by interpreter. Is
> this behaviour ok or shall we free the first one as well and return
> with fail?
It's OK for me, but I don't run PCRE on limited memory devices.
> 2) Shall PCRE_INFO_JITSIZE return with the sum of all code sizes
This is what I would expect intuitively.
> or just the size of the function for normal matching? Shall we introduce
> other size getters for the other compilation modes?
Not sure how much this would complicate the library and usage.