[pcre-dev] [Bug 2299] New: PCRE 10.31: Normalize output of …

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 2299] New: PCRE 10.31: Normalize output of 'pcre2_serialize_encode'
https://bugs.exim.org/show_bug.cgi?id=2299

            Bug ID: 2299
           Summary: PCRE 10.31: Normalize output of
                    'pcre2_serialize_encode'
           Product: PCRE
           Version: 10.31 (PCRE2)
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: stvar@???
                CC: pcre-dev@???


Created attachment 1097
--> https://bugs.exim.org/attachment.cgi?id=1097&action=edit
Normalize output of 'pcre2_serialize_encode'

Dear Philip,

First of all thank you very much for your great work!

Using PCRE2 v10.31 within one of my projects [1] (those
parts are to be released soon), I noticed the following
issue of function 'pcre2_serialize_encode':

Different instances of the same program calling this
function on the same input produces non-identical output!
This is to say that 'pcre2_serialize_encode' is in fact
non-deterministic.

Looking into the code, I learned that the reason of this
is that pointers are saved as such within the sequence of
bytes returned by 'pcre2_serialize_encode'. The values of
these pointers have no meaning for serialization as such:
their values will anyway be overwritten by the function
'pcre2_serialize_decode' when reconstructing the pattern
structures.

As far as I can see, there is no ground for these values
be left untouched by 'pcre2_serialize_encode'. On the
contrary, reseting them make the automated testing of
programs using PCRE2 an easier task.

Sincerely,

Stefan Vargyas.


[1] Json-Type, http://www.nongnu.org/json-type/

--
You are receiving this mail because:
You are on the CC list for the bug.