This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Make logging more consistent
ClosedPublic

Authored by cryptoad on Mar 6 2018, 1:07 PM.

Details

Summary

A few changes related to logging:

  • prepend Scudo to the error messages so that users can identify that we reported an error;
  • replace a couple of Report calls in the RSS check code with dieWithMessage/Print, mark a condition as UNLIKELY in the process;
  • change some messages so that they all look more or less the same. This includes the CHECK message;
  • adapt a couple of tests with the new strings.

A couple of side notes: this results in a few 1-line-blocks, for which I left
brackets. There doesn't seem to be any style guide for that, I can remove them
if need be. I didn't use SanitizerToolName in the strings, but directly
Scudo because we are the only users, I could change that too.

Diff Detail

Event Timeline

cryptoad created this revision.Mar 6 2018, 1:07 PM
Herald added subscribers: Restricted Project, delcypher, mgorny. · View Herald TranscriptMar 6 2018, 1:07 PM
alekseyshl accepted this revision.Mar 6 2018, 1:12 PM
alekseyshl added inline comments.
lib/scudo/scudo_allocator.cpp
174–175

I'd remove brackets in one liners to be consistent with the rest of the code.

This revision is now accepted and ready to land.Mar 6 2018, 1:12 PM
cryptoad updated this revision to Diff 137253.Mar 6 2018, 1:16 PM

Remove brackets from 1-liners (modulo the 80 character wrap).

cryptoad marked an inline comment as done.Mar 6 2018, 1:30 PM
This revision was automatically updated to reflect the committed changes.