Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. Before sort:
  2. | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
  3. | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
  4. Segmentation fault (core dumped)
  5. william@william-VirtualBox:~/wakim_w-tp05/build$ valgrind ./test_quick_sort
  6. ==23839== Memcheck, a memory error detector
  7. ==23839== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  8. ==23839== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
  9. ==23839== Command: ./test_quick_sort
  10. ==23839==
  11.  
  12. >> Sorted test <<
  13. Before sort:
  14. | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
  15. | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
  16. ==23839== Invalid read of size 4
  17. ==23839== at 0x400AD8: partition (quick_sort.c:17)
  18. ==23839== by 0x400B9B: quick_sort (quick_sort.c:45)
  19. ==23839== by 0x4007D9: test (test_quick_sort.c:39)
  20. ==23839== by 0x400928: sorted_test (test_quick_sort.c:50)
  21. ==23839== by 0x400A6E: main (test_quick_sort.c:73)
  22. ==23839== Address 0x51fd068 is 0 bytes after a block of size 40 alloc'd
  23. ==23839== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  24. ==23839== by 0x400A57: main (test_quick_sort.c:72)
  25. ==23839==
  26. ==23839== Invalid read of size 4
  27. ==23839== at 0x400AE4: partition (quick_sort.c:20)
  28. ==23839== by 0x400B9B: quick_sort (quick_sort.c:45)
  29. ==23839== by 0x4007D9: test (test_quick_sort.c:39)
  30. ==23839== by 0x400928: sorted_test (test_quick_sort.c:50)
  31. ==23839== by 0x400A6E: main (test_quick_sort.c:73)
  32. ==23839== Address 0x51fd03c is 4 bytes before a block of size 40 alloc'd
  33. ==23839== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  34. ==23839== by 0x400A57: main (test_quick_sort.c:72)
  35. ==23839==
  36. ==23839== Invalid write of size 4
  37. ==23839== at 0x400AF3: partition (quick_sort.c:21)
  38. ==23839== by 0x400B9B: quick_sort (quick_sort.c:45)
  39. ==23839== by 0x4007D9: test (test_quick_sort.c:39)
  40. ==23839== by 0x400928: sorted_test (test_quick_sort.c:50)
  41. ==23839== by 0x400A6E: main (test_quick_sort.c:73)
  42. ==23839== Address 0x51fd03c is 4 bytes before a block of size 40 alloc'd
  43. ==23839== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  44. ==23839== by 0x400A57: main (test_quick_sort.c:72)
  45. ==23839==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement