Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. ~/pset4/speller/ $ help50 valgrind ./speller texts/a.txt
  2. ==12968== Memcheck, a memory error detector
  3. ==12968== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  4. ==12968== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
  5. ==12968== Command: ./speller texts/a.txt
  6. ==12968==
  7.  
  8. MISSPELLED WORDS
  9.  
  10. ==12968== Invalid read of size 8
  11. ==12968== at 0x401409: check (dictionary.c:150)
  12. ==12968== by 0x400C39: main (speller.c:113)
  13. ==12968== Address 0x522d090 is 80 bytes inside a block of size 224 free'd
  14. ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  15. ==12968== by 0x401350: load (dictionary.c:130)
  16. ==12968== by 0x400914: main (speller.c:41)
  17. ==12968== Block was alloc'd at
  18. ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  19. ==12968== by 0x401114: load (dictionary.c:71)
  20. ==12968== by 0x400914: main (speller.c:41)
  21. ==12968==
  22. ==12968== Invalid read of size 8
  23. ==12968== at 0x40143E: check (dictionary.c:154)
  24. ==12968== by 0x400C39: main (speller.c:113)
  25. ==12968== Address 0x522d090 is 80 bytes inside a block of size 224 free'd
  26. ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  27. ==12968== by 0x401350: load (dictionary.c:130)
  28. ==12968== by 0x400914: main (speller.c:41)
  29. ==12968== Block was alloc'd at
  30. ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  31. ==12968== by 0x401114: load (dictionary.c:71)
  32. ==12968== by 0x400914: main (speller.c:41)
  33. ==12968==
  34. jjiji
  35. hru
  36. gg
  37. ==12968== Invalid read of size 8
  38. ==12968== at 0x401025: erase (dictionary.c:35)
  39. ==12968== by 0x401384: unload (dictionary.c:167)
  40. ==12968== by 0x400DB9: main (speller.c:153)
  41. ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
  42. ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  43. ==12968== by 0x401350: load (dictionary.c:130)
  44. ==12968== by 0x400914: main (speller.c:41)
  45. ==12968== Block was alloc'd at
  46. ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  47. ==12968== by 0x401114: load (dictionary.c:71)
  48. ==12968== by 0x400914: main (speller.c:41)
  49. ==12968==
  50. ==12968== Invalid read of size 8
  51. ==12968== at 0x401039: erase (dictionary.c:37)
  52. ==12968== by 0x401384: unload (dictionary.c:167)
  53. ==12968== by 0x400DB9: main (speller.c:153)
  54. ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
  55. ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  56. ==12968== by 0x401350: load (dictionary.c:130)
  57. ==12968== by 0x400914: main (speller.c:41)
  58. ==12968== Block was alloc'd at
  59. ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  60. ==12968== by 0x401114: load (dictionary.c:71)
  61. ==12968== by 0x400914: main (speller.c:41)
  62. ==12968==
  63. ==12968== Invalid read of size 8
  64. ==12968== at 0x40104E: erase (dictionary.c:39)
  65. ==12968== by 0x401384: unload (dictionary.c:167)
  66. ==12968== by 0x400DB9: main (speller.c:153)
  67. ==12968== Address 0x522d048 is 8 bytes inside a block of size 224 free'd
  68. ==12968== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  69. ==12968== by 0x401350: load (dictionary.c:130)
  70. ==12968== by 0x400914: main (speller.c:41)
  71. ==12968== Block was alloc'd at
  72. ==12968== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  73. ==12968== by 0x401114: load (dictionary.c:71)
  74. ==12968== by 0x400914: main (speller.c:41)
  75. ==12968==
  76.  
  77. WORDS MISSPELLED: 3
  78. WORDS IN DICTIONARY: 143091
  79. WORDS IN TEXT: 3
  80. TIME IN load: 3.48
  81. TIME IN check: 0.04
  82. TIME IN size: 0.00
  83. TIME IN unload: 4.66
  84. TIME IN TOTAL: 8.18
  85.  
  86. ==12968==
  87. ==12968== HEAP SUMMARY:
  88. ==12968== in use at exit: 0 bytes in 0 blocks
  89. ==12968== total heap usage: 510,180 allocs, 510,180 frees, 88,819,322 bytes allocated
  90. ==12968==
  91. ==12968== All heap blocks were freed -- no leaks are possible
  92. ==12968==
  93. ==12968== For counts of detected and suppressed errors, rerun with: -v
  94. ==12968== ERROR SUMMARY: 86 errors from 5 contexts (suppressed: 0 from 0)
  95.  
  96. Asking for help...
  97.  
  98. ==12968== Invalid read of size 8
  99. ==12968== at 0x401409: check (dictionary.c:150)
  100. ==12968== by 0x400C39: main (speller.c:113)
  101.  
  102. 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