Advertisement
Guest User

Untitled

a guest
May 17th, 2018
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. ==6841== Memcheck, a memory error detector
  2. ==6841== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  3. ==6841== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
  4. ==6841== Command: ./test
  5. ==6841==
  6. ==6841== Conditional jump or move depends on uninitialised value(s)
  7. ==6841== at 0x4C30836: __GI___rawmemchr (vg_replace_strmem.c:1410)
  8. ==6841== by 0x4EB4A41: _IO_str_init_static_internal (in /usr/lib64/libc-2.17.so)
  9. ==6841== by 0x4EA2566: __isoc99_vsscanf (in /usr/lib64/libc-2.17.so)
  10. ==6841== by 0x4EA2506: __isoc99_sscanf (in /usr/lib64/libc-2.17.so)
  11. ==6841== by 0x400776: main (test.c:42)
  12. ==6841== Uninitialised value was created by a heap allocation
  13. ==6841== at 0x4C2BBB8: realloc (vg_replace_malloc.c:785)
  14. ==6841== by 0x4006D0: main (test.c:32)
  15. ==6841==
  16. ==6841== Invalid write of size 4
  17. ==6841== at 0x4E92191: _IO_vfscanf (in /usr/lib64/libc-2.17.so)
  18. ==6841== by 0x4EA257B: __isoc99_vsscanf (in /usr/lib64/libc-2.17.so)
  19. ==6841== by 0x4EA2506: __isoc99_sscanf (in /usr/lib64/libc-2.17.so)
  20. ==6841== by 0x400776: main (test.c:42)
  21. ==6841== Address 0x52033e8 is 8 bytes inside a block of size 10 alloc'd
  22. ==6841== at 0x4C29B6D: malloc (vg_replace_malloc.c:298)
  23. ==6841== by 0x4C2BB39: realloc (vg_replace_malloc.c:785)
  24. ==6841== by 0x400727: main (test.c:41)
  25. ==6841==
  26. ==6841== Invalid write of size 4
  27. ==6841== at 0x4E925AD: _IO_vfscanf (in /usr/lib64/libc-2.17.so)
  28. ==6841== by 0x4EA257B: __isoc99_vsscanf (in /usr/lib64/libc-2.17.so)
  29. ==6841== by 0x4EA2506: __isoc99_sscanf (in /usr/lib64/libc-2.17.so)
  30. ==6841== by 0x400776: main (test.c:42)
  31. ==6841== Address 0x52033ec is 2 bytes after a block of size 10 alloc'd
  32. ==6841== at 0x4C29B6D: malloc (vg_replace_malloc.c:298)
  33. ==6841== by 0x4C2BB39: realloc (vg_replace_malloc.c:785)
  34. ==6841== by 0x400727: main (test.c:41)
  35. ==6841==
  36. ==6841== Invalid write of size 1
  37. ==6841== at 0x4E911CF: _IO_vfscanf (in /usr/lib64/libc-2.17.so)
  38. ==6841== by 0x4EA257B: __isoc99_vsscanf (in /usr/lib64/libc-2.17.so)
  39. ==6841== by 0x4EA2506: __isoc99_sscanf (in /usr/lib64/libc-2.17.so)
  40. ==6841== by 0x400776: main (test.c:42)
  41. ==6841== Address 0x5203400 is 22 bytes after a block of size 10 alloc'd
  42. ==6841== at 0x4C29B6D: malloc (vg_replace_malloc.c:298)
  43. ==6841== by 0x4C2BB39: realloc (vg_replace_malloc.c:785)
  44. ==6841== by 0x400727: main (test.c:41)
  45. ==6841==
  46. ==6841== Invalid write of size 1
  47. ==6841== at 0x4E9127A: _IO_vfscanf (in /usr/lib64/libc-2.17.so)
  48. ==6841== by 0x4EA257B: __isoc99_vsscanf (in /usr/lib64/libc-2.17.so)
  49. ==6841== by 0x4EA2506: __isoc99_sscanf (in /usr/lib64/libc-2.17.so)
  50. ==6841== by 0x400776: main (test.c:42)
  51. ==6841== Address 0x5203408 is 24 bytes after a block of size 16 in arena "client"
  52. ==6841==
  53. 6
  54. ==6841==
  55. ==6841== HEAP SUMMARY:
  56. ==6841== in use at exit: 618 bytes in 3 blocks
  57. ==6841== total heap usage: 5 allocs, 2 frees, 648 bytes allocated
  58. ==6841==
  59. ==6841== 10 bytes in 1 blocks are definitely lost in loss record 1 of 3
  60. ==6841== at 0x4C29B6D: malloc (vg_replace_malloc.c:298)
  61. ==6841== by 0x4C2BB39: realloc (vg_replace_malloc.c:785)
  62. ==6841== by 0x400727: main (test.c:41)
  63. ==6841==
  64. ==6841== 40 bytes in 1 blocks are definitely lost in loss record 2 of 3
  65. ==6841== at 0x4C2BBB8: realloc (vg_replace_malloc.c:785)
  66. ==6841== by 0x4006D0: main (test.c:32)
  67. ==6841==
  68. ==6841== LEAK SUMMARY:
  69. ==6841== definitely lost: 50 bytes in 2 blocks
  70. ==6841== indirectly lost: 0 bytes in 0 blocks
  71. ==6841== possibly lost: 0 bytes in 0 blocks
  72. ==6841== still reachable: 568 bytes in 1 blocks
  73. ==6841== suppressed: 0 bytes in 0 blocks
  74. ==6841== Reachable blocks (those to which a pointer was found) are not shown.
  75. ==6841== To see them, rerun with: --leak-check=full --show-leak-kinds=all
  76. ==6841==
  77. ==6841== For counts of detected and suppressed errors, rerun with: -v
  78. ==6841== ERROR SUMMARY: 15 errors from 7 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement