<div dir="ltr">Hi Duncan, <div>looking at your commit, were the other three instances that were in my patch of this pattern not affected, or was that an oversight?</div><div><br></div><div>Thanks,</div><div>Keno</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 11, 2014 at 6:53 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No problem!<br>
<div class="HOEnZb"><div class="h5"><br>
> On 2014 Dec 11, at 15:52, Keno Fischer <<a href="mailto:kfischer@college.harvard.edu">kfischer@college.harvard.edu</a>> wrote:<br>
><br>
> Sorry about that. I haven't found the time to get back to this (super busy this last month). I was planning to look at this again next week, but thanks for committing it :)!<br>
><br>
> On Thu, Dec 11, 2014 at 6:38 PM, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
><br>
> > On 2014 Nov 9, at 13:17, Keno Fischer <<a href="mailto:kfischer@college.harvard.edu">kfischer@college.harvard.edu</a>> wrote:<br>
> ><br>
> > Previously when a metadata string contained unicode characters,<br>
> > it would be incorrectly placed in the Record array because chars<br>
> > are signed by default and hence characters with the high bit set<br>
> > would get sign extended, but the bitcode writer was attempting<br>
> > to write the lowest 8 bit of the now sign-extended value. This<br>
> > caused an assertion failure later on. The fix is just to cast<br>
> > the pointer to uint8_t* first to prevent sign extension.<br>
> > This came up in the context for metadata strings, but I did a<br>
> > quick pass and changed the other instances of this pattern in<br>
> > the file as well.<br>
> ><br>
> > <a href="http://reviews.llvm.org/D6184" target="_blank">http://reviews.llvm.org/D6184</a><br>
> ><br>
> > Files:<br>
> >  lib/Bitcode/Writer/BitcodeWriter.cpp<br>
> >  test/Bitcode/unicode.ll<br>
> > <D6184.15959.patch>_______________________________________________<br>
> > llvm-commits mailing list<br>
> > <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
> This review seemed to get stalled.  I just committed a fix based on Keno's<br>
> patch in r224077 (which I think matches what David and my bike-shedding<br>
> landed on), fixing PR21882.<br>
><br>
<br>
</div></div></blockquote></div><br></div>