[libcxx-dev] Invalid std::basic_string handling of big CharTs
Eric Fiselier via libcxx-dev
libcxx-dev at lists.llvm.org
Wed Nov 14 10:37:28 PST 2018
As you mentioned, this is fixed in libc++ 7.0. It was PR31454 and was fixed
by commit r324531.
AFAIK we're not doing dot releases on LLVM 6 anymore, so I don't think
there is anything to do.
/Eric
On Sat, Nov 3, 2018 at 7:49 PM Přemysl Janouch via libcxx-dev <
libcxx-dev at lists.llvm.org> wrote:
> Hey,
> rather minimal reproducer on at least clang++ & libc++ 3.5 upto 6.0:
>
> #include <string>
>
> struct big { int bloat[4]; };
> using big_string = std::basic_string<big>;
>
> int main () {
> big_string a;
> for (int i = 0; i < 100; i++)
> a += big {};
> return 0;
> }
>
> $ clang++ -stdlib=libc++ reproducer.cpp
> $ valgrind ./a.out
>
> Lots of invalid writes, in practice causes segmentation faults.
>
> Thanks in advance for fixing. The use case was ncurses' cchar_t.
>
> Regards,
> Přemysl Janouch
>
>
> _______________________________________________
> libcxx-dev mailing list
> libcxx-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20181114/95cd6eea/attachment.html>
More information about the libcxx-dev
mailing list