A fix is available
APAR status
Closed as program error.
Error description
Regular expression like "A?(X|Y|Z)" failed to be compiled by regcomp and regexec gives "No Match Found" error Problem does not occur by using PERL, because it will not use libc.a.
Local fix
Problem summary
Regular expression like "A?(X|Y|Z)" failed to be compiled by regcomp and regexec gives "No Match Found" error. Following testcase shows the issue: main() { char* ptn = "A?(X|Y|Z)"; char* wrk 6 = { "xxAXxx","xxAYxx","xxAZxx","xxXxxx", "xxYxxx", "xxZxxx" }; regex_t re; int i, sts; printf(" n Pattern: "%s " n n", ptn); if ( regcomp(&re, ptn, REG_EXTENDED) == 0 ) { for(i=0; i<6; i++) { printf(" %s ...(%d) n", wrk i , regexec(&re, wrk i , (size_t)0,NULL,0)); } } printf(" n"); regfree(&re); } Pattern: "A?(X|Y|Z)" xxAXxx ...(0) xxAYxx ...(0) xxAZxx ...(0) xxXxxx ...(0) incorrect output for these two expressions. xxYxxx ...(1) xxZxxx ...(1)
Problem conclusion
regcomp() need modification, A flag needs to be set with proper conditional statement while mapping the characters in the table.
Temporary fix
Comments
APAR Information
APAR number
IV04945
Reported component name
AIX 610 STD EDI
Reported component ID
5765G6200
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Submitted date
2011-08-09
Closed date
2011-08-09
Last modified date
2013-03-24
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
AIX 610 STD EDI
Fixed component ID
5765G6200
Applicable component levels
R610 PSY U848444
UP11/10/26 I 1000
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSLLZP","label":"AIX Standard Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSMV87","label":"AIX 6.1 Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMVAX","label":"AIX Express Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSAUMY","label":"IBM AIX Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11Q","label":"AIX 6.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11R","label":"APARs - AIX 7.1 environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
24 March 2013