Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#2963 closed Bugs (fixed)

Inspect tool fails when no errors are found

Reported by: Jeremiah Willcock Owned by: René Rivera
Milestone: Boost 1.40.0 Component: inspection script
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

The Boost inspection program crashes (on OS X, with a null pointer dereference) when run on a directory containing no issues. In particular, line 453 (the first line of the body of worst_offenders_count()) of inspect.cpp (in r52517) accesses msgs.begin(), which is invalid when msgs is empty, leading to a segmentation fault.

Attachments (1)

inspect.patch (445 bytes ) - added by Jeremiah Willcock 14 years ago.
Patch to fix bug.

Download all attachments as: .zip

Change History (7)

by Jeremiah Willcock, 14 years ago

Attachment: inspect.patch added

Patch to fix bug.

comment:1 by Jeremiah Willcock, 14 years ago

I attached a patch to fix the problem. I just changed the code such that worst_offenders_count() just returns when there are no problems found.

comment:2 by anonymous, 14 years ago

Owner: changed from John Maddock to René Rivera

comment:3 by Jeremiah Willcock, 13 years ago

Milestone: Boost 1.39.0Boost 1.40.0

I can commit the patch I attached earlier if you want.

comment:4 by Daniel James, 13 years ago

The patch looks fine to me, you should just go ahead with it. Inspect doesn't really have a maintainer, so you shouldn't wait for permission. If you want a code review the best place to ask is the development list.

comment:5 by Jeremiah Willcock, 13 years ago

Resolution: fixed
Status: newclosed

(In [52995]) Fixes #2963

comment:6 by Daniel James, 13 years ago

(In [53049]) Merge inspect fix for when there are no errors.

Merged revisions 52995 via svnmerge from https://svn.boost.org/svn/boost/trunk

........

r52995 | jewillco | 2009-05-14 15:50:56 +0100 (Thu, 14 May 2009) | 1 line

Fixes #2963

........

Note: See TracTickets for help on using tickets.