Skip to content

Instantly share code, notes, and snippets.

@niuk
Created January 26, 2012 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niuk/1682411 to your computer and use it in GitHub Desktop.
Save niuk/1682411 to your computer and use it in GitHub Desktop.
What valgrind tells me.
==8944== Memcheck, a memory error detector
==8944== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==8944== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==8944== Command: ./Generator
==8944==
; ModuleID = 'myModule'
==8944== Invalid write of size 8
==8944== at 0xB3BB8C: ??? (in /home/karl/Haskell/Hammer/Generator)
==8944== Address 0x64ed560 is not stack'd, malloc'd or (recently) free'd
==8944==
==8944== Invalid read of size 4
==8944== at 0x753630: llvm::LLVMTargetMachine::addCommonCodeGenPasses(llvm::PassManagerBase&, llvm::CodeGenOpt::Level, bool, llvm::MCContext*&) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x75407D: llvm::LLVMTargetMachine::addPassesToEmitMachineCode(llvm::PassManagerBase&, llvm::JITCodeEmitter&, llvm::CodeGenOpt::Level, bool) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x496B66: llvm::JIT::JIT(llvm::Module*, llvm::TargetMachine&, llvm::TargetJITInfo&, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x496C60: llvm::JIT::createJIT(llvm::Module*, std::string*, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool, llvm::TargetMachine*) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x4AE702: llvm::EngineBuilder::create() (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x4BA08A: LLVMCreateJITCompilerForModule (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x466C5F: ??? (in /home/karl/Haskell/Hammer/Generator)
==8944== Address 0x160 is not stack'd, malloc'd or (recently) free'd
==8944==
==8944==
==8944== Process terminating with default action of signal 11 (SIGSEGV)
==8944== Access not within mapped region at address 0x160
==8944== at 0x753630: llvm::LLVMTargetMachine::addCommonCodeGenPasses(llvm::PassManagerBase&, llvm::CodeGenOpt::Level, bool, llvm::MCContext*&) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x75407D: llvm::LLVMTargetMachine::addPassesToEmitMachineCode(llvm::PassManagerBase&, llvm::JITCodeEmitter&, llvm::CodeGenOpt::Level, bool) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x496B66: llvm::JIT::JIT(llvm::Module*, llvm::TargetMachine&, llvm::TargetJITInfo&, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x496C60: llvm::JIT::createJIT(llvm::Module*, std::string*, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool, llvm::TargetMachine*) (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x4AE702: llvm::EngineBuilder::create() (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x4BA08A: LLVMCreateJITCompilerForModule (in /home/karl/Haskell/Hammer/Generator)
==8944== by 0x466C5F: ??? (in /home/karl/Haskell/Hammer/Generator)
==8944== If you believe this happened as a result of a stack
==8944== overflow in your program's main thread (unlikely but
==8944== possible), you can try to increase the size of the
==8944== main thread stack using the --main-stacksize= flag.
==8944== The main thread stack size used in this run was 8388608.
==8944==
==8944== HEAP SUMMARY:
==8944== in use at exit: 182,604 bytes in 223 blocks
==8944== total heap usage: 2,660 allocs, 2,437 frees, 469,026 bytes allocated
==8944==
==8944== LEAK SUMMARY:
==8944== definitely lost: 0 bytes in 0 blocks
==8944== indirectly lost: 0 bytes in 0 blocks
==8944== possibly lost: 276 bytes in 7 blocks
==8944== still reachable: 182,328 bytes in 216 blocks
==8944== suppressed: 0 bytes in 0 blocks
==8944== Rerun with --leak-check=full to see details of leaked memory
==8944==
==8944== For counts of detected and suppressed errors, rerun with: -v
==8944== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2)
Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment