Skip to content

Instantly share code, notes, and snippets.

@kodo-pp
Created June 28, 2018 18:47
Show Gist options
  • Save kodo-pp/436ec7219b1a2018276f60b0f846cf74 to your computer and use it in GitHub Desktop.
Save kodo-pp/436ec7219b1a2018276f60b0f846cf74 to your computer and use it in GitHub Desktop.
$ valgrind --main-stacksize=200000000 ./main
<... Some long output ...>
==10944== Thread 3:
==10944== Invalid read of size 8
==10944== at 0x66184C9: ??? (in /usr/lib/libGL.so.1.0.0)
==10944== by 0x51A80F2: irr::video::COpenGLTexture::COpenGLTexture(irr::video::IImage*, irr::core::string<char, irr::core::irrAllocator<char> > const&, void*, irr::video::COpenGLDriver*) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x518D6D4: irr::video::COpenGLDriver::createDeviceDependentTexture(irr::video::IImage*, irr::core::string<char, irr::core::irrAllocator<char> > const&, void*) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x51837BD: irr::video::CNullDriver::loadTextureFromFile(irr::io::IReadFile*, irr::core::string<char, irr::core::irrAllocator<char> > const&) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x5183E37: irr::video::CNullDriver::getTexture(irr::core::string<char, irr::core::irrAllocator<char> > const&) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x12CE98: handlerGraphicsLoadTexture(std::vector<void*, std::allocator<void*> > const&) (graphics.cpp:123)
==10944== by 0x12FBD2: std::_Function_handler<FuncResult* (std::vector<void*, std::allocator<void*> > const&), FuncResult* (*)(std::vector<void*, std::allocator<void*> > const&)>::_M_invoke(std::_Any_data const&, std::vector<void*, std::allocator<void*> > const&) (std_function.h:282)
==10944== by 0x128490: std::function<FuncResult* (std::vector<void*, std::allocator<void*> > const&)>::operator()(std::vector<void*, std::allocator<void*> > const&) const (std_function.h:687)
==10944== by 0x12731E: FuncProvider::operator()(std::vector<void*, std::allocator<void*> > const&) (core.cpp:47)
==10944== by 0x13A77E: ModuleWorker::work() (module_worker.cpp:80)
==10944== by 0x13A1A1: ModuleWorker::please_work() (module_worker.cpp:19)
==10944== by 0x134E56: moduleServerThreadFunc(int) (net.cpp:136)
==10944== Address 0xa40 is not stack'd, malloc'd or (recently) free'd
==10944==
==10944==
==10944== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==10944== Access not within mapped region at address 0xA40
==10944== at 0x66184C9: ??? (in /usr/lib/libGL.so.1.0.0)
==10944== by 0x51A80F2: irr::video::COpenGLTexture::COpenGLTexture(irr::video::IImage*, irr::core::string<char, irr::core::irrAllocator<char> > const&, void*, irr::video::COpenGLDriver*) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x518D6D4: irr::video::COpenGLDriver::createDeviceDependentTexture(irr::video::IImage*, irr::core::string<char, irr::core::irrAllocator<char> > const&, void*) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x51837BD: irr::video::CNullDriver::loadTextureFromFile(irr::io::IReadFile*, irr::core::string<char, irr::core::irrAllocator<char> > const&) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x5183E37: irr::video::CNullDriver::getTexture(irr::core::string<char, irr::core::irrAllocator<char> > const&) (in /usr/lib/libIrrlicht.so.1.8.4)
==10944== by 0x12CE98: handlerGraphicsLoadTexture(std::vector<void*, std::allocator<void*> > const&) (graphics.cpp:123)
==10944== by 0x12FBD2: std::_Function_handler<FuncResult* (std::vector<void*, std::allocator<void*> > const&), FuncResult* (*)(std::vector<void*, std::allocator<void*> > const&)>::_M_invoke(std::_Any_data const&, std::vector<void*, std::allocator<void*> > const&) (std_function.h:282)
==10944== by 0x128490: std::function<FuncResult* (std::vector<void*, std::allocator<void*> > const&)>::operator()(std::vector<void*, std::allocator<void*> > const&) const (std_function.h:687)
==10944== by 0x12731E: FuncProvider::operator()(std::vector<void*, std::allocator<void*> > const&) (core.cpp:47)
==10944== by 0x13A77E: ModuleWorker::work() (module_worker.cpp:80)
==10944== by 0x13A1A1: ModuleWorker::please_work() (module_worker.cpp:19)
==10944== by 0x134E56: moduleServerThreadFunc(int) (net.cpp:136)
==10944== If you believe this happened as a result of a stack
==10944== overflow in your program's main thread (unlikely but
==10944== possible), you can try to increase the size of the
==10944== main thread stack using the --main-stacksize= flag.
==10944== The main thread stack size used in this run was 200003584.
==10944==
==10944== HEAP SUMMARY:
==10944== in use at exit: 5,500,219 bytes in 6,524 blocks
==10944== total heap usage: 20,754 allocs, 14,230 frees, 132,651,188 bytes allocated
==10944==
==10944== LEAK SUMMARY:
==10944== definitely lost: 0 bytes in 0 blocks
==10944== indirectly lost: 0 bytes in 0 blocks
==10944== possibly lost: 591,844 bytes in 36 blocks
==10944== still reachable: 4,908,375 bytes in 6,488 blocks
==10944== of which reachable via heuristic:
==10944== newarray : 16 bytes in 1 blocks
==10944== multipleinheritance: 104 bytes in 1 blocks
==10944== suppressed: 0 bytes in 0 blocks
==10944== Rerun with --leak-check=full to see details of leaked memory
==10944==
==10944== For counts of detected and suppressed errors, rerun with: -v
==10944== Use --track-origins=yes to see where uninitialised values come from
==10944== ERROR SUMMARY: 19 errors from 7 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment