Module Name:    src
Committed By:   christos
Date:           Tue Jul 30 20:24:59 UTC 2019

Modified Files:
        src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: ctype.cc

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


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
    src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.1.1.3 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc:1.1.1.3	Sat Jan 19 05:14:05 2019
+++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/ctype.cc	Tue Jul 30 16:24:58 2019
@@ -53,7 +53,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   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();
   }

Reply via email to