Advertisement
Guest User

Untitled

a guest
May 6th, 2010
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 13.19 KB | None | 0 0
  1. prasoon@prasoon-desktop ~ $ valgrind -v ./a.out
  2. ==4446== Memcheck, a memory error detector
  3. ==4446== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
  4. ==4446== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
  5. ==4446== Command: ./a.out
  6. ==4446==
  7. --4446-- Valgrind options:
  8. --4446--    -v
  9. --4446-- Contents of /proc/version:
  10. --4446--   Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
  11. --4446-- Arch and hwcaps: X86, x86-sse1-sse2
  12. --4446-- Page sizes: currently 4096, max supported 4096
  13. --4446-- Valgrind library directory: /usr/local/lib/valgrind
  14. --4446-- Reading syms from /lib/ld-2.9.so (0x4000000)
  15. --4446-- Reading debug info from /lib/ld-2.9.so ..
  16. --4446-- .. CRC mismatch (computed 049232cc wanted 022486d8)
  17. --4446--    object doesn't have a symbol table
  18. --4446-- Reading syms from /home/prasoon/a.out (0x8048000)
  19. --4446-- Reading syms from /usr/local/lib/valgrind/memcheck-x86-linux (0x38000000)
  20. --4446--    object doesn't have a dynamic symbol table
  21. --4446-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
  22. --4446-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-x86-linux.so (0x4020000)
  23. --4446-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so (0x4023000)
  24. --4446-- Reading syms from /usr/lib/libstdc++.so.6.0.10 (0x403c000)
  25. --4446-- Reading debug info from /usr/lib/libstdc++.so.6.0.10 ..
  26. --4446-- .. CRC mismatch (computed 87794c5d wanted bcd37461)
  27. --4446--    object doesn't have a symbol table
  28. --4446-- Reading syms from /lib/tls/i686/cmov/libm-2.9.so (0x412b000)
  29. --4446-- Reading debug info from /lib/tls/i686/cmov/libm-2.9.so ..
  30. --4446-- .. CRC mismatch (computed 9d3c94d0 wanted 85a674c7)
  31. --4446--    object doesn't have a symbol table
  32. --4446-- Reading syms from /lib/libgcc_s.so.1 (0x4152000)
  33. --4446-- Reading debug info from /lib/libgcc_s.so.1 ..
  34. --4446-- .. CRC mismatch (computed 224ab3f8 wanted 89276151)
  35. --4446--    object doesn't have a symbol table
  36. --4446-- Reading syms from /lib/tls/i686/cmov/libc-2.9.so (0x4161000)
  37. --4446-- Reading debug info from /lib/tls/i686/cmov/libc-2.9.so ..
  38. --4446-- .. CRC mismatch (computed 7ee64c88 wanted 8d898f0d)
  39. --4446--    object doesn't have a symbol table
  40. --4446-- REDIR: 0x41d8a60 (rindex) redirected to 0x40267e0 (rindex)
  41. --4446-- REDIR: 0x41d85e0 (strlen) redirected to 0x4026b90 (strlen)
  42. --4446-- REDIR: 0x41da850 (memcpy) redirected to 0x4027000 (memcpy)
  43. --4446-- REDIR: 0x40f6f20 (operator new(unsigned int)) redirected to 0x402631b (operator new(unsigned int))
  44. --4446-- REDIR: 0x41da2d0 (memmove) redirected to 0x4027b00 (memmove)
  45. --4446-- REDIR: 0x40f5210 (operator delete(void*)) redirected to 0x40254c8 (operator delete(void*))
  46. ==4446== Invalid write of size 4
  47. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  48. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  49. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  50. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  51. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  52. ==4446==  Address 0x42c50d4 is 36 bytes inside a block of size 48 free'd
  53. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  54. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  55. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  56. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  57. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  58. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  59. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  60. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  61. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  62. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  63. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  64. ==4446==
  65. ==4446== Invalid write of size 4
  66. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  67. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  68. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  69. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  70. ==4446==  Address 0x42c50c8 is 24 bytes inside a block of size 48 free'd
  71. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  72. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  73. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  74. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  75. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  76. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  77. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  78. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  79. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  80. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  81. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  82. ==4446==
  83. ==4446== Invalid write of size 4
  84. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  85. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  86. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  87. ==4446==  Address 0x42c5074 is 12 bytes inside a block of size 24 free'd
  88. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  89. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  90. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  91. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  92. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  93. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  94. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  95. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  96. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  97. ==4446==
  98. ==4446== Invalid write of size 4
  99. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  100. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  101. ==4446==  Address 0x42c5028 is 0 bytes inside a block of size 12 free'd
  102. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  103. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  104. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  105. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  106. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  107. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  108. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  109. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  110. ==4446==
  111. 012345FINISH!
  112. --4446-- REDIR: 0x41d2520 (free) redirected to 0x40257b1 (free)
  113. ==4446==
  114. ==4446== HEAP SUMMARY:
  115. ==4446==     in use at exit: 0 bytes in 0 blocks
  116. ==4446==   total heap usage: 4 allocs, 4 frees, 180 bytes allocated
  117. ==4446==
  118. ==4446== All heap blocks were freed -- no leaks are possible
  119. ==4446==
  120. ==4446== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 17 from 6)
  121. ==4446==
  122. ==4446== 1 errors in context 1 of 4:
  123. ==4446== Invalid write of size 4
  124. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  125. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  126. ==4446==  Address 0x42c5028 is 0 bytes inside a block of size 12 free'd
  127. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  128. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  129. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  130. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  131. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  132. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  133. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  134. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  135. ==4446==
  136. ==4446==
  137. ==4446== 1 errors in context 2 of 4:
  138. ==4446== Invalid write of size 4
  139. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  140. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  141. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  142. ==4446==  Address 0x42c5074 is 12 bytes inside a block of size 24 free'd
  143. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  144. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  145. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  146. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  147. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  148. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  149. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  150. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  151. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  152. ==4446==
  153. ==4446==
  154. ==4446== 1 errors in context 3 of 4:
  155. ==4446== Invalid write of size 4
  156. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  157. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  158. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  159. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  160. ==4446==  Address 0x42c50c8 is 24 bytes inside a block of size 48 free'd
  161. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  162. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  163. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  164. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  165. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  166. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  167. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  168. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  169. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  170. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  171. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  172. ==4446==
  173. ==4446==
  174. ==4446== 1 errors in context 4 of 4:
  175. ==4446== Invalid write of size 4
  176. ==4446==    at 0x804884B: rec(int) (in /home/prasoon/a.out)
  177. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  178. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  179. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  180. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  181. ==4446==  Address 0x42c50d4 is 36 bytes inside a block of size 48 free'd
  182. ==4446==    at 0x402554D: operator delete(void*) (vg_replace_malloc.c:346)
  183. ==4446==    by 0x8048AFC: __gnu_cxx::new_allocator<XYZ>::deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  184. ==4446==    by 0x8048B26: std::_Vector_base<XYZ, std::allocator<XYZ> >::_M_deallocate(XYZ*, unsigned int) (in /home/prasoon/a.out)
  185. ==4446==    by 0x8049147: std::vector<XYZ, std::allocator<XYZ> >::_M_insert_aux(__gnu_cxx::__normal_iterator<XYZ*, std::vector<XYZ, std::allocator<XYZ> > >, XYZ const&) (in /home/prasoon/a.out)
  186. ==4446==    by 0x80491EA: std::vector<XYZ, std::allocator<XYZ> >::push_back(XYZ const&) (in /home/prasoon/a.out)
  187. ==4446==    by 0x8048819: rec(int) (in /home/prasoon/a.out)
  188. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  189. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  190. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  191. ==4446==    by 0x804884A: rec(int) (in /home/prasoon/a.out)
  192. ==4446==    by 0x8048884: main (in /home/prasoon/a.out)
  193. ==4446==
  194. --4446--
  195. --4446-- used_suppression:     17 dl-hack3-cond-1
  196. ==4446==
  197. ==4446== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 17 from 6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement