Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11 There is no sp...



details:   https://anonhg.NetBSD.org/src/rev/f905267a5f0f
branches:  trunk
changeset: 844024:f905267a5f0f
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 30 20:24:58 2019 +0000

description:
There is no specialized constructor for ctype<char> so the
destructor ends up trying to free uninitialized memory for
_M_c_locale_ctype.

diffstat:

 external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r c02829b83eb5 -r f905267a5f0f external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc    Tue Jul 30 20:19:18 2019 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc    Tue Jul 30 20:24:58 2019 +0000
@@ -53,7 +53,11 @@
 
   ctype<char>::~ctype()
   {
+#if 0
+    // There is no constructor for the char specialization, and
+    // _M_c_locale_ctype is uninitialized, found by jemalloc
     _S_destroy_c_locale(_M_c_locale_ctype);
+#endif
     if (_M_del)
       delete[] this->table();
   }



Home | Main Index | Thread Index | Old Index