Go to file
Howard Hinnant bfd96e11ed Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers.
Remaining characters should be discarded once sync() called. If don’t, garbage
characters can be inserted to the front of external buffer in underflow().
Because underflow() copies remaining characters in external buffer to it’s
front. This results wrong characters insertion when seekpos() or seekoff() is
called.

this line should be inserted in sync() just before return:
__extbufnext_ = __extbufend_ = __extbuf_;

2. sync() should use length() rather than out() to calculate offset.
Reversing iterators and calling out() to calculate offset from behind is
working fine in stateless character encoding. However, in stateful encoding,
escape sequences could differ in length. As a result, out() could return wrong
length. 

For example, if we have internal buffer converted from this external sequence:
(capital letters mean escape sequence)
… a a a a B b b b b

out() produces this sequence. 
b b b b A a a a a

Because out() inserts escape sequence A rather than B, result sequence doesn't
match to external sequence. A and B could have different lengths, result offset
could be wrong value too.

length() method in codecvt is right for calculating offset, but it counts
offset from the beginning of buffer. So it requires another state member
variable to hold state before conversion.
Fixes http://llvm.org/bugs/show_bug.cgi?id=13667

llvm-svn: 162601
2012-08-24 21:20:56 +00:00
clang [analyzer] Ted fixed the plist-html issue, so the assert can go away. 2012-08-24 21:07:49 +00:00
clang-tools-extra Change AST matcher names to conform with the new naming. 2012-08-24 05:39:51 +00:00
compiler-rt tsan: improve memory allocator a bit 2012-08-24 15:53:14 +00:00
debuginfo-tests Fix this for gdb 7.4. 2012-07-23 19:41:58 +00:00
libclc Add rsqrt builtin. Based on patch by Cassie Epps! 2012-08-21 10:48:35 +00:00
libcxx Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers. 2012-08-24 21:20:56 +00:00
libcxxabi Change size of reference count field in __libcpp_nmstr from 32 bits to 64 bits for 64 bit targets. This is controls the data layout of all exceptions defined in <stdexcept>. This aligns the ABI with that of gcc-4.2. 2012-08-08 16:15:16 +00:00
lld Hook up lld-test to llvm check-all. Patch by Andy Gibbs! 2012-07-31 18:44:52 +00:00
lldb Providing an additional Python command example 2012-08-24 21:20:14 +00:00
llvm Stop inferring isVariadic from instruction patterns. 2012-08-24 21:08:09 +00:00
polly PoCC: Simplify condition 2012-08-24 13:56:56 +00:00