[PATCH] D48446: [ubsan] Add support for reporting diagnostics to a monitor process

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 13:18:20 PDT 2018


vsk added inline comments.


================
Comment at: lib/ubsan/ubsan_monitor.cc:53
+  InternalScopedString &Buf = CurrentUBR->Buffer;
+  char FirstChar = Buf.data()[0];
+  if (FirstChar >= 'a' && FirstChar <= 'z')
----------------
vitalybuka wrote:
> vsk wrote:
> > vitalybuka wrote:
> > > why do you need this?
> > This is a relatively noninvasive way of making sure the text of diagnostics can't begin with a lowercase letter. I'll add a comment.
> Thanks. That's clear from the code.
> I am rather curios why it's important. Is this always upper case for messages from other components passed to monitor?
Oh, good question. I'm not sure how the other sanitizers handle capitalization.

W.r.t ubsan integration into Xcode, I was simply asked to make diagnostics start with proper capitalization during internal review. Because of loose coupling between compiler-rt and Xcode, it was more convenient to do the capitalization here, although it would be cleaner to move this into Xcode.


https://reviews.llvm.org/D48446





More information about the llvm-commits mailing list