Multiple Leaks
darksylinc opened this issue · 0 comments
darksylinc commented
According to our own API, cpp.Parse( preamble.c_str(), preamble.size(), unusedVal );
can return a ptr that we may have to free.
However we don't do such thing.
Originally reported in the forum.
There are also other leaks reported such as mVendorExtension never being freed.
System Information
- Ogre Version: >= 2.3
- Operating System / Platform: All
- RenderSystem: GL3+ and D3D11
- GPU: Any
Callstack
Error #52: LEAK 64 bytes
replace_malloc
D:\a\drmemory\drmemory\common\alloc_replace.c(2580):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Token::Append
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(91):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Parse
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(1431):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::loadFromSource
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(183):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevelImpl
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(329):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevel
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(184):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::createParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(153):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::createParameters
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(541):
OgreNextMain_d.dll!Ogre::GpuProgram::getDefaultParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreGpuProgram.cpp(409):
OgreNextMain_d.dll!Ogre::GpuProgramTranslator::translate
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptTranslator.cpp(4698):
OgreNextMain_d.dll!Ogre::ScriptCompiler::compile
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptCompiler.cpp(353):
OgreNextMain_d.dll!Ogre::ScriptCompiler::compile
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptCompiler.cpp(259):
Error #53: LEAK 64 bytes
replace_malloc
D:\a\drmemory\drmemory\common\alloc_replace.c(2580):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Token::Append
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(91):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Parse
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(1431):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::loadFromSource
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(183):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevelImpl
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(329):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevel
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(184):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::createParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(153):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::createParameters
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(541):
OgreNextMain_d.dll!Ogre::GpuProgram::getDefaultParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreGpuProgram.cpp(409):
OgreNextMain_d.dll!Ogre::GpuProgramTranslator::translate
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptTranslator.cpp(4696):
OgreNextMain_d.dll!Ogre::ScriptCompiler::compile
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptCompiler.cpp(353):
OgreNextMain_d.dll!Ogre::ScriptCompiler::compile
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreScriptCompiler.cpp(259):
Error #54: LEAK 8 bytes
replace_operator_new
D:\a\drmemory\drmemory\common\alloc_replace.c(2903):
RenderSystem_Direct3D11_d.dll!Ogre::D3D11VendorExtension::initializeExtension
D:\OGRE_NEXT\ogre-next\RenderSystems\Direct3D11\src\VendorExtensions\OgreD3D11VendorExtension.cpp(58):
RenderSystem_Direct3D11_d.dll!Ogre::D3D11RenderSystem::D3D11RenderSystem
D:\OGRE_NEXT\ogre-next\RenderSystems\Direct3D11\src\OgreD3D11RenderSystem.cpp(135):
RenderSystem_Direct3D11_d.dll!Ogre::D3D11Plugin::install
D:\OGRE_NEXT\ogre-next\RenderSystems\Direct3D11\src\OgreD3D11Plugin.cpp(44):
OgreNextMain_d.dll!Ogre::Root::installPlugin
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreRoot.cpp(1426):
RenderSystem_Direct3D11_d.dll!dllStartPlugin
D:\OGRE_NEXT\ogre-next\RenderSystems\Direct3D11\src\OgreD3D11EngineDll.cpp(40):
DerivedGraphicsSystem::initialize
D:\OGRE_NEXT\game\src\OgreDerived\DerivedGraphicsSystem.cpp(58):
WinMain
D:\OGRE_NEXT\game\src\main.cpp(72):
Error #55: LEAK 64 bytes
replace_malloc
D:\a\drmemory\drmemory\common\alloc_replace.c(2580):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Token::Append
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(91):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Parse
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(1431):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::loadFromSource
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(183):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevelImpl
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(329):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevel
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(184):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::createParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(153):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::createParameters
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(541):
OgreNextMain_d.dll!Ogre::UnifiedHighLevelGpuProgram::createParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreUnifiedHighLevelGpuProgram.cpp(153):
OgreNextMain_d.dll!Ogre::GpuProgramUsage::recreateParameters
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreGpuProgramUsage.cpp(230):
OgreNextMain_d.dll!Ogre::GpuProgramUsage::setProgramName
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreGpuProgramUsage.cpp(105):
OgreNextMain_d.dll!Ogre::Pass::setFragmentProgram
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgrePass.cpp(846):
Error #56: LEAK 64 bytes
replace_malloc
D:\a\drmemory\drmemory\common\alloc_replace.c(2580):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Token::Append
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(91):
RenderSystem_GL3Plus_d.dll!Ogre::CPreprocessor::Parse
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLPreprocessor.cpp(1431):
RenderSystem_GL3Plus_d.dll!Ogre::GLSLShader::loadFromSource
D:\OGRE_NEXT\ogre-next\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp(183):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevelImpl
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(329):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadHighLevel
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(184):
OgreNextMain_d.dll!Ogre::HighLevelGpuProgram::loadImpl
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHighLevelGpuProgram.cpp(113):
OgreNextMain_d.dll!Ogre::Hlms::compileShaderCode
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHlms.cpp(2244):
OgreNextMain_d.dll!Ogre::Hlms::_compileShaderFromPreprocessedSource
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHlms.cpp(2279):
OgreNextMain_d.dll!Ogre::HlmsDiskCache::_compileShadersThread
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHlmsDiskCache.cpp(203):
OgreNextMain_d.dll!Ogre::HlmsDiskCache::applyTo
D:\OGRE_NEXT\ogre-next\OgreMain\src\OgreHlmsDiskCache.cpp(307):
Demo::GraphicsSystem::loadHlmsDiskCache
D:\OGRE_NEXT\ogre-next\Samples\2.0\Common\src\GraphicsSystem.cpp(637):
===========================================================================
FINAL SUMMARY:
DUPLICATE ERROR COUNTS:
Error # 3: 1690
Error # 4: 1937
Error # 5: 422
Error # 6: 1690
Error # 7: 1937
Error # 8: 422
Error # 12: 2
Error # 13: 3
Error # 14: 2
Error # 15: 3
Error # 16: 2
Error # 17: 3
Error # 18: 2
Error # 19: 3
Error # 20: 2
Error # 21: 3
Error # 22: 2
Error # 23: 3
Error # 26: 3
Error # 28: 3
Error # 30: 3
Error # 32: 3
Error # 34: 3
Error # 36: 3
Error # 38: 3
Error # 40: 3
Error # 42: 3
Error # 44: 3
Error # 46: 3
Error # 48: 3
Error # 49: 118
Error # 50: 8
Error # 51: 5
Error # 52: 13
Error # 53: 5
Error # 55: 3
Error # 56: 2
SUPPRESSIONS USED:
ERRORS FOUND:
0 unique, 0 total unaddressable access(es)
51 unique, 8313 total uninitialized access(es)
0 unique, 0 total invalid heap argument(s)
0 unique, 0 total GDI usage error(s)
0 unique, 0 total handle leak(s)
0 unique, 0 total warning(s)
5 unique, 24 total, 1480 byte(s) of leak(s)
0 unique, 0 total, 0 byte(s) of possible leak(s)