[PATCH] Make sure BitcodeWriter works with Unicode characters

Keno Fischer kfischer at college.harvard.edu
Thu Dec 11 15:52:43 PST 2014


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 :)!

On Thu, Dec 11, 2014 at 6:38 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > On 2014 Nov 9, at 13:17, Keno Fischer <kfischer at college.harvard.edu>
> wrote:
> >
> > Previously when a metadata string contained unicode characters,
> > it would be incorrectly placed in the Record array because chars
> > are signed by default and hence characters with the high bit set
> > would get sign extended, but the bitcode writer was attempting
> > to write the lowest 8 bit of the now sign-extended value. This
> > caused an assertion failure later on. The fix is just to cast
> > the pointer to uint8_t* first to prevent sign extension.
> > This came up in the context for metadata strings, but I did a
> > quick pass and changed the other instances of this pattern in
> > the file as well.
> >
> > http://reviews.llvm.org/D6184
> >
> > Files:
> >  lib/Bitcode/Writer/BitcodeWriter.cpp
> >  test/Bitcode/unicode.ll
> > <D6184.15959.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> This review seemed to get stalled.  I just committed a fix based on Keno's
> patch in r224077 (which I think matches what David and my bike-shedding
> landed on), fixing PR21882.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141211/3f21cb99/attachment.html>


More information about the llvm-commits mailing list