[PATCH] D48271: [llvm-readobj] Fix printing format

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 15:03:25 PDT 2018


paulsemel added a comment.

In https://reviews.llvm.org/D48271#1150086, @dblaikie wrote:

> In https://reviews.llvm.org/D48271#1149023, @paulsemel wrote:
>
> > I got a build fail here : http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10648
> >  As for now, I still don't know why I'm getting this error, but I guessed it was because I was passing the raw_stream..
> >  This should fix this, I hope
>
>
> I'd guess it's pretty unlikely that it's the passing of a raw_ostream by reference - that's a pretty common thing. To my mind, the code that looks more likely to be crashing there is that maybe the StringRef is out-of-bounds and the range-based for loop is running off the end of the underlying buffer.
>
> Have you tried running the test under valgrind? asan? msan? things like that. You might be able to reproduce/identify the crash on your machine so you can validate a fix rather than throwing it at the buildbots again.


Well, I ran it for the first patch. This one, I'm just refactoring, nothing has changed for the bounds right ?
Of the first patch passed the buildbots, that means there was no problem about bounds (and as I said, I ran asan on it).
I will do it again tomorrow, maybe the but was not trigger before and is now, but I honestly doubt it :)


Repository:
  rL LLVM

https://reviews.llvm.org/D48271





More information about the llvm-commits mailing list