[Bug middle-end/40147] New: [4.5 Regression] Memory leak in revision 147436
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu May 14 13:37:00 GMT 2009
On Linux/ia32, revision 147436 failed to compile 483.xalancbmk in SPEC
CPU 2006:
gnu-33:pts/4[38]> /export/gnu/import/rrs/147454/usr/bin/gcc -m32 -c -o
DocumentImpl.o -DSPEC_CPU -DNDEBUG -DAPP_NO_THREADS -DXALAN_INMEM_MSG_LOADER
-I. -Ixercesc -Ixercesc/dom -Ixercesc/dom/impl -Ixercesc/sax
-Ixercesc/util/MsgLoaders/InMemory -Ixercesc/util/Transcoders/Iconv
-Ixalanc/include -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C
-DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER
-DXML_USE_INMEM_MESSAGELOADER -O3 -msse2 -mfpmath=sse -ffast-math
-funroll-loops -DSPEC_CPU_LINUX DocumentImpl.cpp
In file included from ./xercesc/util/RefHashTableOf.hpp:373,
from xercesc/dom/DocumentImpl.hpp:78,
from DocumentImpl.cpp:65:
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::put(void*, TVal*) [with TVal = void]Â:
DocumentImpl.cpp:833: instantiated from here
./xercesc/util/RefHashTableOf.c:460: warning: deleting Âvoid*Â is undefined
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeAll() [with TVal = void]Â:
./xercesc/util/RefHashTableOf.c:226: instantiated from
Âxercesc_2_5::RefHashTableOf<TVal>::~RefHashTableOf() [with TVal = void]Â
DocumentImpl.cpp:186: instantiated from here
./xercesc/util/RefHashTableOf.c:281: warning: deleting Âvoid*Â is undefined
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeBucketElem(const void*, unsigned int&)
[with TVal = void]Â:
./xercesc/util/RefHashTableOf.c:260: instantiated from Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeKey(const void*) [with TVal = void]Â
DocumentImpl.cpp:831: instantiated from here
./xercesc/util/RefHashTableOf.c:596: warning: deleting Âvoid*Â is undefined
DocumentImpl.cpp: In static member function Âstatic
xercesc_2_5::TreeWalkerImpl*
xercesc_2_5::DocumentImpl::createTreeWalker(xercesc_2_5::DOM_Node, long
unsigned int, xercesc_2_5::DOM_NodeFilter*, bool,
xercesc_2_5::MemoryManager*)Â:
DocumentImpl.cpp:389: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gnu-33:pts/4[39]>
It doesn't happen with preprocessed file. Valgrind reports:
In file included from ./xercesc/util/RefHashTableOf.hpp:373,
from xercesc/dom/DocumentImpl.hpp:78,
from DocumentImpl.cpp:65:
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::put(void*, TVal*) [with TVal = void]Â:
DocumentImpl.cpp:833: instantiated from here
./xercesc/util/RefHashTableOf.c:460: warning: deleting Âvoid*Â is undefined
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeAll() [with TVal = void]Â:
./xercesc/util/RefHashTableOf.c:226: instantiated from
Âxercesc_2_5::RefHashTableOf<TVal>::~RefHashTableOf() [with TVal = void]Â
DocumentImpl.cpp:186: instantiated from here
./xercesc/util/RefHashTableOf.c:281: warning: deleting Âvoid*Â is undefined
./xercesc/util/RefHashTableOf.c: In member function Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeBucketElem(const void*, unsigned int&)
[with TVal = void]Â:
./xercesc/util/RefHashTableOf.c:260: instantiated from Âvoid
xercesc_2_5::RefHashTableOf<TVal>::removeKey(const void*) [with TVal = void]Â
DocumentImpl.cpp:831: instantiated from here
./xercesc/util/RefHashTableOf.c:596: warning: deleting Âvoid*Â is undefined
==23451== Invalid read of size 2
==23451== at 0xD94DF4: simple_cst_equal (tree.c:5079)
==23451== by 0xE3A33A: check_stmt (ipa-pure-const.c:445)
==23451== by 0xE3A737: analyze_function (ipa-pure-const.c:512)
==23451== by 0xE3BD22: local_pure_const (ipa-pure-const.c:925)
==23451== by 0xA93F9E: execute_one_pass (passes.c:1283)
==23451== by 0xA941E5: execute_pass_list (passes.c:1332)
==23451== by 0xA94203: execute_pass_list (passes.c:1333)
==23451== by 0xC0743C: tree_rest_of_compilation (tree-optimize.c:394)
==23451== by 0xE2AFC3: cgraph_expand_function (cgraphunit.c:1095)
==23451== by 0xE2B173: cgraph_expand_all_functions (cgraphunit.c:1154)
==23451== by 0xE2B71D: cgraph_optimize (cgraphunit.c:1377)
==23451== by 0x5C430D: cp_write_global_declarations (decl2.c:3635)
==23451== Address 0xb5fc300 is not stack'd, malloc'd or (recently) free'd
DocumentImpl.cpp: In static member function Âstatic
xercesc_2_5::TreeWalkerImpl*
xercesc_2_5::DocumentImpl::createTreeWalker(xercesc_2_5::DOM_Node, long
unsigned int, xercesc_2_5::DOM_NodeFilter*, bool,
xercesc_2_5::MemoryManager*)Â:
DocumentImpl.cpp:389: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [4.5 Regression] Memory leak in revision 147436
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40147
More information about the Gcc-bugs
mailing list