Ticket #1795 (new bug)

Opened 4 years ago

Last modified 4 years ago

pcre_compile picked wrong function signature letter.

Reported by: ronaldws Owned by:
Priority: normal Milestone:
Component: library Version: 2.7.0
Severity: medium Keywords:
Cc: whiteknight, NotFound, plobsing Language:
Patch status: new Platform:

Description

The pcre_compile library function takes a const char ** parameter which SHOULD have been matched by a capital 'V' in the signature but a somewhat similar capital 'B' was picked instead resulting in the error string not being passed back properly.

The patches have been tested on windows and ubuntu. Note that the changes to src/nci/extra_thunks.c are generated by tools/dev/mk_nci_thunks.pl but are included here as the .c file is under version control and I don't think it's genned by the Makefile.

See also the irc discussion here:  http://irclog.perlgeek.de/parrot/2010-09-18#i_2840413

Attachments

pcre.pir.patch Download (0.6 KB) - added by ronaldws 4 years ago.
pcre nci interface file with small change to interface signature
extra_thunks.c.patch Download (2.8 KB) - added by ronaldws 4 years ago.
Output file from extra_thunks.nci and nci_thunk_gen.pir.
extra_thunks.nci.patch Download (368 bytes) - added by ronaldws 4 years ago.
Patch file for extra_thunks.nci whcih provides nci signatures
libpcre.pir.patch Download (1.2 KB) - added by jkeenan 4 years ago.
pcre nci interface implementation with changed compile function for new signatur.
pcre.t.patch Download (2.0 KB) - added by ronaldws 4 years ago.
Patch to add test for returned error string

Change History

Changed 4 years ago by ronaldws

pcre nci interface file with small change to interface signature

Changed 4 years ago by ronaldws

Output file from extra_thunks.nci and nci_thunk_gen.pir.

Changed 4 years ago by ronaldws

Patch file for extra_thunks.nci whcih provides nci signatures

follow-up: ↓ 2   Changed 4 years ago by ronaldws

Attaching extra_thunks.nci was unintentional (could someone delete it from here?). Just use extra_thunks.nci.patch.

in reply to: ↑ 1   Changed 4 years ago by jkeenan

Replying to ronaldws:

Attaching extra_thunks.nci was unintentional (could someone delete it from here?). Just use extra_thunks.nci.patch.

Done.

Changed 4 years ago by jkeenan

pcre nci interface implementation with changed compile function for new signatur.

  Changed 4 years ago by jkeenan

Corrected two instances of trailing whitespace in libpcre.pir.patch.

  Changed 4 years ago by jkeenan

  • cc whiteknight, NotFound, plobsing added
  • patch set to new

I applied these patches to my checkouts on Linux/i386 and Darwin/PPC. On Linux, I got PASS on make test and got some codingstd errors on make fulltest. I corrected the trailing space errors in the patch, which means that, once applied, make fulltest should PASS as well. On Darwin, I got PASS on make test.

So, from a testing point of view, these 4 patches look good to me. But, given discussion on IRC referred to, I would like these reviewed by people who know more about NCI than I do. If the other reviewers are satisfied, we can apply these patches after this week's release.

Thank you very much.

kid51

Changed 4 years ago by ronaldws

Patch to add test for returned error string

  Changed 4 years ago by ronaldws

Just added one more patch that verifies that the other patches are working properly and the compile nci/pcre function really returns error strings from pcre_compile. Patch modifies t/library/pcre.t adding one more test step to test 2.

Note: See TracTickets for help on using tickets.