Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mihai@keldon:/data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton$ valgrind ./Dogson < ../test.txt
- ==11948== Memcheck, a memory error detector
- ==11948== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
- ==11948== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
- ==11948== Command: ./Dogson
- ==11948==
- >Take a NAP after you EAT
- <
- ==11948== Use of uninitialised value of size 8
- ==11948== at 0x400F5B: mytolower (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948== by 0x40109F: main (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948==
- ==11948== Invalid read of size 1
- ==11948== at 0x400F5B: mytolower (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948== by 0x40109F: main (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948== Address 0x0 is not stack'd, malloc'd or (recently) free'd
- ==11948==
- ==11948==
- ==11948== Process terminating with default action of signal 11 (SIGSEGV)
- ==11948== Access not within mapped region at address 0x0
- ==11948== at 0x400F5B: mytolower (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948== by 0x40109F: main (in /data/prg/prgcts/pilgrimgray_2012/2.dogson/fanton/Dogson)
- ==11948== If you believe this happened as a result of a stack
- ==11948== overflow in your program's main thread (unlikely but
- ==11948== possible), you can try to increase the size of the
- ==11948== main thread stack using the --main-stacksize= flag.
- ==11948== The main thread stack size used in this run was 8388608.
- ==11948==
- ==11948== HEAP SUMMARY:
- ==11948== in use at exit: 8,000,004 bytes in 2 blocks
- ==11948== total heap usage: 2 allocs, 0 frees, 8,000,004 bytes allocated
- ==11948==
- ==11948== LEAK SUMMARY:
- ==11948== definitely lost: 0 bytes in 0 blocks
- ==11948== indirectly lost: 0 bytes in 0 blocks
- ==11948== possibly lost: 0 bytes in 0 blocks
- ==11948== still reachable: 8,000,004 bytes in 2 blocks
- ==11948== suppressed: 0 bytes in 0 blocks
- ==11948== Rerun with --leak-check=full to see details of leaked memory
- ==11948==
- ==11948== For counts of detected and suppressed errors, rerun with: -v
- ==11948== Use --track-origins=yes to see where uninitialised values come from
- ==11948== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2)
- Segmentation fault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement