parameters: (self, name, report_type, instr, stack, defined_at)
return_statement: return super(DrMemorySuppression, self).__init__(name, report_type, stack,
                                                       defined_at, regex)
docstring: Constructor.
docstring_summary: Constructor.
docstring_tokens: Constructor .
function: def __init__(self, name, report_type, instr, stack, defined_at):
      """Constructor."""
      self.instr = instr
  
      # Construct the regex.
      regex = '{\n'
      if report_type == 'LEAK':
        regex += '(POSSIBLE )?LEAK'
      else:
        regex += report_type
      regex += '\nname=.*\n'
  
      # TODO(rnk): Implement http://crbug.com/107416#c5 .
      # drmemory_analyze.py doesn't generate suppressions with an instruction in
      # them, so these suppressions will always fail to match.  We should override
      # Match to fetch the instruction from the report and try to match against
      # that.
      if instr:
        regex += 'instruction=%s\n' % GlobToRegex(instr)
  
      for line in stack:
        if line == ELLIPSIS:
          regex += '(.*\n)*'
        elif '!' in line:
          (mod, func) = line.split('!')
          if func == ELLIPSIS:  # mod!ellipsis frame
            regex += '(%s\!.*\n)+' % GlobToRegex(mod, ignore_case=True)
          else:  # mod!func frame
            # Ignore case for the module match, but not the function match.
            regex += '%s\!%s\n' % (GlobToRegex(mod, ignore_case=True),
                                   GlobToRegex(func, ignore_case=False))
        else:
          regex += GlobToRegex(line)
          regex += '\n'
      regex += '(.*\n)*'  # Match anything left in the stack.
      regex += '}'
      return super(DrMemorySuppression, self).__init__(name, report_type, stack,
                                                       defined_at, regex)
function_tokens: def __init__ ( self , name , report_type , instr , stack , defined_at ) : self . instr = instr # Construct the regex. regex = '{\n' if report_type == 'LEAK' : regex += '(POSSIBLE )?LEAK' else : regex += report_type regex += '\nname=.*\n' # TODO(rnk): Implement http://crbug.com/107416#c5 . # drmemory_analyze.py doesn't generate suppressions with an instruction in # them, so these suppressions will always fail to match.  We should override # Match to fetch the instruction from the report and try to match against # that. if instr : regex += 'instruction=%s\n' % GlobToRegex ( instr ) for line in stack : if line == ELLIPSIS : regex += '(.*\n)*' elif '!' in line : ( mod , func ) = line . split ( '!' ) if func == ELLIPSIS : # mod!ellipsis frame regex += '(%s\!.*\n)+' % GlobToRegex ( mod , ignore_case = True ) else : # mod!func frame # Ignore case for the module match, but not the function match. regex += '%s\!%s\n' % ( GlobToRegex ( mod , ignore_case = True ) , GlobToRegex ( func , ignore_case = False ) ) else : regex += GlobToRegex ( line ) regex += '\n' regex += '(.*\n)*' # Match anything left in the stack. regex += '}' return super ( DrMemorySuppression , self ) . __init__ ( name , report_type , stack , defined_at , regex )