Re: [pcre-dev] A question about testinput18

Top Page
Delete this message
Author: Ze'ev Atlas
Date:  
To: pcre-dev@exim.org
Subject: Re: [pcre-dev] A question about testinput18
PhilipContinuing with my wild theory, don't we need to set local to EBCDIC? Ze'ev Atlas




      From: Ze'ev Atlas <zatlas1@???>
 To: "pcre-dev@???" <pcre-dev@???> 
 Sent: Thursday, December 31, 2015 7:42 PM
 Subject: Re: [pcre-dev] A question about testinput18


Hi PhilipIs it possible that for POSIX you use any of the alternative character tables that are hard coded in the pcre2test.c? Ze'ev Atlas




      From: Ze'ev Atlas <zatlas1@???>
 To: "pcre-dev@???" <pcre-dev@???> 
 Sent: Wednesday, December 30, 2015 8:41 PM
 Subject: Re: [pcre-dev] A question about testinput18


One more clarificationI run tests 1, 2, 11, 14, 15, 16, 18, 20, 21 which I deemed to be relevant to show that the EBCDIC version is well behaving.  Most all those tests ran fine (with the expected differences from the ASCII tests) except of test 18.  I have yet to fully analyze all the particular details, but only test 18 produces consistently the error messages that we have discussed.
Now test 18 is POSIX and there should be something in the POSIX/EBCDIC combination that causes the test to explode.
My config.h contains this:
#undef PCRE2POSIX_EXP_DEFN

I could not find any other POSIX specific tokens in my configuration.
I compile all the programs with these external options (akin to -D in gcc).  Some of those are IBM C related, but the rest are what you would expect when compiling PCRE2 for z/OS.  Again, I do not see anything that should adversely affect POSIX
DEF(HAVE_CONFIG_H)           DEF(HAVE_STDINT_H)           DEF(_XOPEN_SOURCE)           DEF(_POSIX_SOURCE)           UNDEF(__cplusplus)           DEF(PCRE2_CODE_UNIT_WIDTH=8) DEF(NATIVE_ZOS=1)            DEF(EBCDIC=1)                UNDEF(SUPPORT_JIT)            Ze'ev Atlas


      From: Ze'ev Atlas <zatlas1@???>
 To: "pcre-dev@???" <pcre-dev@???> 
 Sent: Wednesday, December 30, 2015 8:48 AM
 Subject: Re: [pcre-dev] A question about testinput18


Hi PhilI cannot find what is wrong with my email!
I double checked for #define SUPPORT_PCRE2_8 in my config.h and it was there.  Then I followed the instructions (see excerpt from the compiler listing below).  Then I ran it and sure enough, the output is same as before (see attached)
7260  2139 |while (notdone)                                                    7261       |  {                                                                7262       |  uint8_t *p;                                                      7263  2140 |  int rc = PR_OK;                                                  7264  2141 |  BOOL expectdata = TEST(compiled_code, !=, NULL);                 7265       |#ifdef SUPPORT_PCRE2_8                                             7266  2142 |  expectdata |= preg.re_pcre2_code != NULL;                        7267  2143 |fprintf(outfile, "+++expectdata=%d\n", expectdata); /* <====== Add 7268       |#endif                                                             7269       |                                                                   7270  2144 |  if (extend_inputline(infile, buffer, expectdata? "data> " : "  re7271  2145 |    break;                                                         7272  2146 |  if (!INTERACTIVE(infile)) fprintf(outfile, "%s", (char *)buffer);7273  2148 |  fflush(outfile);                                                 7274  2149 |  p = buffer;                                                       Ze'ev Atlas




      From: "ph10@???" <ph10@???>
 To: Ze'ev Atlas <zatlas1@???> 
Cc: "pcre-dev@???" <pcre-dev@???>
 Sent: Wednesday, December 30, 2015 4:16 AM
 Subject: Re: [pcre-dev] A question about testinput18


On Wed, 30 Dec 2015, Ze'ev Atlas wrote:

> It is 0 all the time.  Enclosed is the output file (translated to ASCII as usual) Ze'ev Atlas


So it isn't recognising that it has a compiled pattern to test. Did you
check that SUPPORT_PCRE2_8 is defined? Another test would be to move the
added line:

while (notdone)                                                             
  {                                                                         
  uint8_t *p;                                                               
  int rc = PR_OK;                                               
  BOOL expectdata = TEST(compiled_code, !=, NULL);                       
#ifdef SUPPORT_PCRE2_8                                         
  expectdata |= preg.re_pcre2_code != NULL;                               
fprintf(outfile, "+++expectdata=%d\n", expectdata); /* <====== Add this line */
#endif       

I've moved it inside the #ifdef. If there is no output, then it's not
seeing SUPPORT_PCRE2_8. If there *is* output, something else is going
wrong ... and I will have to think about it.

Philip

--
Philip Hazel