CMake support memory errors

Hamish Rodda rodda at kde.org
Mon Dec 15 02:06:59 UTC 2008


Hi,

Anyone know why this is happening? (opening kdevelop with both kdevplatform 
and kdevelop projects open)

==2247== Thread 4:                                                                                                              
==2247== Invalid read of size 8                                                                                                 
==2247==    at 0xA868915: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:270)     
==2247==    by 0xA868D70: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::append(KDevelop::DUContext::Import const&) (kdevvarlengtharray.h:126)                                                                                                            
==2247==    by 0xA85B209: 
KDevelop::DUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (ducontext.cpp:895)                                                                                                    
==2247==    by 0xA86BFBE: 
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (topducontext.cpp:1379)                                                                                             
==2247==    by 0x13B6ECDA: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1872)       
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)                        
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)       
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)                        
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)       
==2247==    by 0x139064AC: 
CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) 
(cmakemanager.cpp:478)                      
==2247==    by 0xA5A5598: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:47)     
==2247==    by 0xA5A55DC: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:50)     
==2247==  Address 0x2a9b6068 is 0 bytes after a block of size 440 alloc'd                                                       
==2247==    at 0x4C2694E: malloc (vg_replace_malloc.c:207)                                                                      
==2247==    by 0x8913B06: qMalloc(unsigned long) (qmalloc.cpp:51)                                                               
==2247==    by 0xA8688BF: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:262)     
==2247==    by 0xA868A46: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::resize(int) (kdevvarlengtharray.h:223)           
==2247==    by 0xA86A65D: void 
KDevelop::DUContextData::m_importedContextsCopyFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:63)                                                                                                
==2247==    by 0xA86B4F8: void 
KDevelop::DUContextData::m_childContextsCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:64)                                                                                                
==2247==    by 0xA86B538: void 
KDevelop::DUContextData::m_importersCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:68)                                                                                                    
==2247==    by 0xA86B578: void 
KDevelop::DUContextData::m_localDeclarationsCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:71)                                                                                            
==2247==    by 0xA86B5B8: void 
KDevelop::DUContextData::m_usesCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:76)                                                                                                         
==2247==    by 0xA8605F7: 
KDevelop::DUContextData::DUContextData(KDevelop::DUContextData const&) 
(ducontext.cpp:99)             
==2247==    by 0xA879A8D: 
KDevelop::TopDUContextData::TopDUContextData(KDevelop::TopDUContextData 
const&) (topducontextdata.h:41)                                                                                                                               
==2247==    by 0xA879B66: KDevelop::DUChainItemFactory<KDevelop::TopDUContext, 
KDevelop::TopDUContextData>::cloneData(KDevelop::DUChainBaseData const&) const 
(duchainregister.h:80)                                                                            
==2247==                                                                                                                        
==2247== Invalid read of size 8                                                                                                 
==2247==    at 0xA86891B: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:270)     
==2247==    by 0xA868D70: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::append(KDevelop::DUContext::Import const&) (kdevvarlengtharray.h:126)                                                                                                            
==2247==    by 0xA85B209: 
KDevelop::DUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (ducontext.cpp:895)                                                                                                    
==2247==    by 0xA86BFBE: 
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (topducontext.cpp:1379)                                                                                             
==2247==    by 0x13B6ECDA: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1872)       
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)                        
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)       
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)                        
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)       
==2247==    by 0x139064AC: 
CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) 
(cmakemanager.cpp:478)                      
==2247==    by 0xA5A5598: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:47)     
==2247==    by 0xA5A55DC: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:50)     
==2247==  Address 0x2a9b6070 is 8 bytes after a block of size 440 alloc'd                                                       
==2247==    at 0x4C2694E: malloc (vg_replace_malloc.c:207)                                                                      
==2247==    by 0x8913B06: qMalloc(unsigned long) (qmalloc.cpp:51)                                                               
==2247==    by 0xA8688BF: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:262)     
==2247==    by 0xA868A46: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::resize(int) (kdevvarlengtharray.h:223)           
==2247==    by 0xA86A65D: void 
KDevelop::DUContextData::m_importedContextsCopyFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:63)                                                                                                
==2247==    by 0xA86B4F8: void 
KDevelop::DUContextData::m_childContextsCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:64)                                                                                                
==2247==    by 0xA86B538: void 
KDevelop::DUContextData::m_importersCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:68)                                                                                                    
==2247==    by 0xA86B578: void 
KDevelop::DUContextData::m_localDeclarationsCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:71)                                                                                            
==2247==    by 0xA86B5B8: void 
KDevelop::DUContextData::m_usesCopyAllFrom<KDevelop::DUContextData>(KDevelop::DUContextData 
const&) (ducontextdata.h:76)                                                                                                         
==2247==    by 0xA8605F7: 
KDevelop::DUContextData::DUContextData(KDevelop::DUContextData const&) 
(ducontext.cpp:99)             
==2247==    by 0xA879A8D: 
KDevelop::TopDUContextData::TopDUContextData(KDevelop::TopDUContextData 
const&) (topducontextdata.h:41)
==2247==    by 0xA879B66: KDevelop::DUChainItemFactory<KDevelop::TopDUContext, 
KDevelop::TopDUContextData>::cloneData(KDevelop::DUChainBaseData const&) const 
(duchainregister.h:80)
==2247==
==2247== Invalid read of size 8
==2247==    at 0xA868923: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:270)
==2247==    by 0xA868D70: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::append(KDevelop::DUContext::Import const&) (kdevvarlengtharray.h:126)
==2247==    by 0xA85B209: 
KDevelop::DUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (ducontext.cpp:895)
==2247==    by 0xA86BFBE: 
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&,bool, bool) (topducontext.cpp:1379)
==2247==    by 0x13B6ECDA: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1872)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x139064AC: 
CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) 
(cmakemanager.cpp:478)
==2247==    by 0xA5A5598: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:47)
==2247==    by 0xA5A55DC: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:50)
==2247==  Address 0x2a9b6078 is not stack'd, malloc'd or (recently) free'd
==2247==
==2247== Invalid read of size 8
==2247==    at 0xA86892B: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:270)
==2247==    by 0xA868D70: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::append(KDevelop::DUContext::Import const&) (kdevvarlengtharray.h:126)
==2247==    by 0xA85B209: 
KDevelop::DUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (ducontext.cpp:895)
==2247==    by 0xA86BFBE: 
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&,bool, bool) (topducontext.cpp:1379)
==2247==    by 0x13B6ECDA: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1872)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x139064AC: 
CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) 
(cmakemanager.cpp:478)
==2247==    by 0xA5A5598: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:47)
==2247==    by 0xA5A55DC: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:50)
==2247==  Address 0x2a9b6080 is not stack'd, malloc'd or (recently) free'd
==2247==
==2247== Invalid read of size 8
==2247==    at 0xA868933: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::realloc(int, int) (kdevvarlengtharray.h:270)
==2247==    by 0xA868D70: KDevVarLengthArray<KDevelop::DUContext::Import, 
10>::append(KDevelop::DUContext::Import const&) (kdevvarlengtharray.h:126)
==2247==    by 0xA85B209: 
KDevelop::DUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&, bool, bool) (ducontext.cpp:895)
==2247==    by 0xA86BFBE: 
KDevelop::TopDUContext::addImportedParentContext(KDevelop::DUContext*, 
KDevelop::SimpleCursor const&,bool, bool) (topducontext.cpp:1379)
==2247==    by 0x13B6ECDA: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1872)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x13B70775: CMakeProjectVisitor::visit(MacroCallAst const*) 
(cmakeprojectvisitor.cpp:986)
==2247==    by 0x13B6F192: CMakeProjectVisitor::walk(QList<CMakeFunctionDesc> 
const&, int) (cmakeprojectvisitor.cpp:1922)
==2247==    by 0x139064AC: 
CMakeProjectManager::parse(KDevelop::ProjectFolderItem*) 
(cmakemanager.cpp:478)
==2247==    by 0xA5A5598: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:47)
==2247==    by 0xA5A55DC: 
KDevelop::ImportProjectJobPrivate::import(KDevelop::ProjectFolderItem*) 
(importprojectjob.cpp:50)
==2247==  Address 0x2a9b6088 is not stack'd, malloc'd or (recently) free'd

etc.

Cheers,
Hamish.




More information about the KDevelop-devel mailing list