Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~/pset4/speller/ $ help50 valgrind ./speller texts/a.txt
- ==12968== Memcheck, a memory error detector
- ==12968== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==12968== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
- ==12968== Command: ./speller texts/a.txt
- ==12968==
- MISSPELLED WORDS
- ==12968== Invalid read of size 8
- ==12968== at 0x401409: check (dictionary.c:150)
- ==12968== by 0x400C39: main (speller.c:113)
- ==12968== Address 0x522d090 is 80 bytes inside a block of size 224 free'd
- ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401350: load (dictionary.c:130)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968== Block was alloc'd at
- ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401114: load (dictionary.c:71)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968==
- ==12968== Invalid read of size 8
- ==12968== at 0x40143E: check (dictionary.c:154)
- ==12968== by 0x400C39: main (speller.c:113)
- ==12968== Address 0x522d090 is 80 bytes inside a block of size 224 free'd
- ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401350: load (dictionary.c:130)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968== Block was alloc'd at
- ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401114: load (dictionary.c:71)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968==
- jjiji
- hru
- gg
- ==12968== Invalid read of size 8
- ==12968== at 0x401025: erase (dictionary.c:35)
- ==12968== by 0x401384: unload (dictionary.c:167)
- ==12968== by 0x400DB9: main (speller.c:153)
- ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
- ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401350: load (dictionary.c:130)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968== Block was alloc'd at
- ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401114: load (dictionary.c:71)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968==
- ==12968== Invalid read of size 8
- ==12968== at 0x401039: erase (dictionary.c:37)
- ==12968== by 0x401384: unload (dictionary.c:167)
- ==12968== by 0x400DB9: main (speller.c:153)
- ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
- ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401350: load (dictionary.c:130)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968== Block was alloc'd at
- ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401114: load (dictionary.c:71)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968==
- ==12968== Invalid read of size 8
- ==12968== at 0x40104E: erase (dictionary.c:39)
- ==12968== by 0x401384: unload (dictionary.c:167)
- ==12968== by 0x400DB9: main (speller.c:153)
- ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
- ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401350: load (dictionary.c:130)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968== Block was alloc'd at
- ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12968== by 0x401114: load (dictionary.c:71)
- ==12968== by 0x400914: main (speller.c:41)
- ==12968==
- WORDS MISSPELLED: 3
- WORDS IN DICTIONARY: 143091
- WORDS IN TEXT: 3
- TIME IN load: 3.48
- TIME IN check: 0.04
- TIME IN size: 0.00
- TIME IN unload: 4.66
- TIME IN TOTAL: 8.18
- ==12968==
- ==12968== HEAP SUMMARY:
- ==12968== in use at exit: 0 bytes in 0 blocks
- ==12968== total heap usage: 510,180 allocs, 510,180 frees, 88,819,322 bytes allocated
- ==12968==
- ==12968== All heap blocks were freed -- no leaks are possible
- ==12968==
- ==12968== For counts of detected and suppressed errors, rerun with: -v
- ==12968== ERROR SUMMARY: 86 errors from 5 contexts (suppressed: 0 from 0)
- Asking for help...
- ==12968== Invalid read of size 8
- ==12968== at 0x401409: check (dictionary.c:150)
- ==12968== by 0x400C39: main (speller.c:113)
- Looks like you're trying to access 8 bytes of memory that isn't yours? Did you try to index into an array beyond its bounds? Take a closer look at line 150 of dictionary.c.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement