[pcre-dev] issue with Posix on z/OS

トップ ページ
このメッセージを削除
著者: Ze'ev Atlas
日付:  
To: pcre exim
題目: [pcre-dev] issue with Posix on z/OS
Hi all
After a successful port of the core PCRE functionality to z/OS, I turned my attention to the last part that has not yet been tested, the Posix modules.
I am running the z/OS version of pcretest.c with option -p (i.e. Posix):
//TEST8 EXEC PGM=PCRETEST,
// PARM='-p PCRE.TESTLIB(TESTIN1) PCRE.STDOUT(MEM1)'


For the uninitiated :) this means the command line
pcretest -p PCRE.TESTLIB(TESTIN1) PCRE.STDOUT(MEM1)
where PCRE.TESTLIB and PCRE.STDOUT are libraries (input and output) and TESTIN1 and MEM1 are members in those libraries (akin to files in directories on Linux and Windows)

TESTIN1 is just the '\pcre-8.33\testdata\testinput1' from the PCRE distribution

When I run the same JCL (i.e. batch or shell on z/OS) without the -p option (I tried it with the -q option) it runs to completion with results that agree with the EBCDIC environment.  Here are the first few lines:
-----------------------------
/-- This set of tests is for features that are compatible with all versions of
    Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
    16-bit PCRE libraries. --/

/the quick brown fox/
    the quick brown fox
 0: the quick brown fox
    The quick brown FOX
No match
    What do you know about the quick brown fox?
 0: the quick brown fox
    What do you know about THE QUICK BROWN FOX?
No match
-----------------------------

The -p option cause it to get into an infinite loop of printing \x00 and ultimately crash when the program tries to write the next \x00 beyond the buffer size (I gave it 30K and it used all of them... the printout below just demonstrate the first 305 characters of the printout.) 

--------------------------------
PCRE version 8.33 2013-05-28

/-- This set of tests is for features that are compatible with all versions of
    Perl >= 5.10, in non-UTF-8 mode. It should run clean for both the 8-bit and
    16-bit PCRE libraries. --/

/the quick brown fox/
    the quick brown fox
 0:
 1: \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
--------------------------------

I do not have the means and the expertise to compile PCRE on either Linux or Windows., so I cannot find whether this is a bug in pcretest.c with the -p option in general or in z/OS only (I would appreciate if somebody could send me Windows 7 64 bit compatible binaries).  Could somebody please run the same thing on Linux or Windows to establish whether it is a localized or global issue.
In any case, does anybody have a clue where should I look to resolve the issue.

Thank you
 
Ze'ev Atlas