Repository: qpid-dispatch Updated Branches: refs/heads/master b7f7b13c7 -> 4edacb72c
NO-JIRA: update grinder with support for invalid free calls Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/4edacb72 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/4edacb72 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/4edacb72 Branch: refs/heads/master Commit: 4edacb72c67e8b5930ab8b3306eb941f7d98637a Parents: b7f7b13 Author: Kenneth Giusti <[email protected]> Authored: Thu Dec 13 15:33:42 2018 -0500 Committer: Kenneth Giusti <[email protected]> Committed: Thu Dec 13 15:34:10 2018 -0500 ---------------------------------------------------------------------- bin/grinder | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/4edacb72/bin/grinder ---------------------------------------------------------------------- diff --git a/bin/grinder b/bin/grinder index 3066498..647c9ba 100755 --- a/bin/grinder +++ b/bin/grinder @@ -170,11 +170,10 @@ class LeakError(ErrorBase): return s -class InvalidMemRWError(ErrorBase): +class InvalidMemError(ErrorBase): def __init__(self, error_xml): kind = error_xml.find("kind").text - assert(kind in ['InvalidRead', 'InvalidWrite']) - super(InvalidMemRWError, self).__init__(kind) + super(InvalidMemError, self).__init__(kind) # expect # what # stack (invalid access) @@ -202,7 +201,7 @@ class InvalidMemRWError(ErrorBase): def __hash__(self): # for now don't include what/auxwhat as it may # be different for the same codepath - h = super(InvalidMemRWError, self).__hash__() + h = super(InvalidMemError, self).__hash__() for f in self._stack: h += hash(f) for s in self._aux_stacks: @@ -211,14 +210,14 @@ class InvalidMemRWError(ErrorBase): return h def __str__(self): - s = super(InvalidMemRWError, self).__str__() + "\n" + s = super(InvalidMemError, self).__str__() + "\n" s += "%s\n" % self._what s += "Stack:" for frame in self._stack: s += "\n %s" % str(frame) for what, stack in zip(self._auxwhat, self._aux_stacks): - s += "\n %s" % what + s += "\n%s:" % what for frame in stack: s += "\n %s" % str(frame) return s @@ -265,16 +264,16 @@ class SignalError(ErrorBase): _ERROR_CLASSES = { - 'InvalidRead': InvalidMemRWError, - 'InvalidWrite': InvalidMemRWError, + 'InvalidRead': InvalidMemError, + 'InvalidWrite': InvalidMemError, 'Leak_DefinitelyLost': LeakError, 'Leak_IndirectlyLost': LeakError, 'Leak_PossiblyLost': LeakError, 'Leak_StillReachable': LeakError, 'UninitCondition': GeneralError, 'SyscallParam': GeneralError, + 'InvalidFree': InvalidMemError, # TBD: - 'InvalidFree': None, 'InvalidJump': None, 'UninitValue': None, } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
