http://bugs.grommit.com/show_bug.cgi?id=332

           Summary: HdrChk throws an "invalid expression" traceback
           Product: SCM Migration
           Version: unspecified
          Platform: All
        OS/Version: Solaris 11/Nevada
            Status: NEW
          Severity: major
          Priority: P3
         Component: hdrchk
        AssignedTo: scm-migration-dev at opensolaris.org
        ReportedBy: stevel at sun.com


Traceback (most recent call last):
  File "/opt/onbld/bin/hdrchk", line 64, in ?
    ret |= hdrchk(fh)
  File "/builds/onnv-scm.hdrchk/usr/src/tools/onbld/Checks/HdrChk.py", line
199, in hdrchk

  File "/usr/lib/python2.4/sre.py", line 134, in search
    return _compile(pattern, flags).search(string)
  File "/usr/lib/python2.4/sre.py", line 227, in _compile
    raise error, v # invalid expression
sre_constants.error: multiple repeat


A sample test file is /usr/include/enchant/enchant++.h
It looks like HdrChk thinks the guardname should be ENCHANT++ and attempts to
hand that off to the re module which then tries to parse ++ as regex
characters.
The enchant++.h actually uses ENCHANT_PLUS_PLUS as its guard.

The current hdrchk.pl actually throws the following Perl error:
Nested quantifiers in regex; marked by <-- HERE in m/^_.*ENCHANT++ <-- HERE
_H[_]?$/ at /ws/onnv-tools/onbld/bin/hdrchk line 199, <FILE> line 31.
Which looks like it tries to do the Perl equivalent of parsing '++'

I wonder if we should do some sort of string replace of '+' to 'PLUS'. 
Continuing to throw that traceback seems like poor form.


-- 
Configure bugmail: http://bugs.grommit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to