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/418760c479c0
branches:  trunk
changeset: 453007:418760c479c0
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 4e7dc4fa7337 -r 418760c479c0 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