nsb

valgrind

nsb
Jul 14th, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. [noah@silverstar logbook]$ valgrind ./test
  2. ==3129== Memcheck, a memory error detector
  3. ==3129== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
  4. ==3129== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
  5. ==3129== Command: ./test
  6. ==3129==
  7. ==3129== Conditional jump or move depends on uninitialised value(s)
  8. ==3129== at 0x4027D3D: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  9. ==3129== by 0x80486AE: xrealloc (utils.c:30)
  10. ==3129== by 0x8048942: cpy (utils.c:71)
  11. ==3129== by 0x8048594: main (test.c:9)
  12. ==3129==
  13. ==3129== Invalid free() / delete / delete[]
  14. ==3129== at 0x4027D82: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  15. ==3129== by 0x80486AE: xrealloc (utils.c:30)
  16. ==3129== by 0x8048942: cpy (utils.c:71)
  17. ==3129== by 0x8048594: main (test.c:9)
  18. ==3129== Address 0x4081f35 is in the Text segment of /lib/libc-2.14.so
  19. ==3129==
  20. ./test: Could not reallocate space!
  21. ==3129== Invalid write of size 1
  22. ==3129== at 0x402865A: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  23. ==3129== by 0x8048966: cpy (utils.c:73)
  24. ==3129== by 0x8048594: main (test.c:9)
  25. ==3129== Address 0x0 is not stack'd, malloc'd or (recently) free'd
  26. ==3129==
  27. ==3129==
  28. ==3129== Process terminating with default action of signal 11 (SIGSEGV)
  29. ==3129== Access not within mapped region at address 0x0
  30. ==3129== at 0x402865A: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  31. ==3129== by 0x8048966: cpy (utils.c:73)
  32. ==3129== by 0x8048594: main (test.c:9)
  33. ==3129== If you believe this happened as a result of a stack
  34. ==3129== overflow in your program's main thread (unlikely but
  35. ==3129== possible), you can try to increase the size of the
  36. ==3129== main thread stack using the --main-stacksize= flag.
  37. ==3129== The main thread stack size used in this run was 8388608.
  38. ==3129==
  39. ==3129== HEAP SUMMARY:
  40. ==3129== in use at exit: 0 bytes in 0 blocks
  41. ==3129== total heap usage: 1 allocs, 1 frees, 7 bytes allocated
  42. ==3129==
  43. ==3129== All heap blocks were freed -- no leaks are possible
  44. ==3129==
  45. ==3129== For counts of detected and suppressed errors, rerun with: -v
  46. ==3129== Use --track-origins=yes to see where uninitialised values come from
  47. ==3129== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 13 from 8)
  48. Speicherzugriffsfehler
Advertisement
Add Comment
Please, Sign In to add comment