Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.55 KB | None | 0 0
  1. valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all ./foo matrix 3
  2. ==2342== Memcheck, a memory error detector
  3. ==2342== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  4. ==2342== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
  5. ==2342== Command: ./foo matrix 3
  6. ==2342==
  7. ==2342== Conditional jump or move depends on uninitialised value(s)
  8. ==2342== at 0x483572C: malloc (vg_replace_malloc.c:299)
  9. ==2342== by 0x10A2A7: read_file (m9.c:146)
  10. ==2342== by 0x10A710: main (m9.c:113)
  11. ==2342== Uninitialised value was created by a stack allocation
  12. ==2342== at 0x10A213: read_file (m9.c:117)
  13. ==2342==
  14. ==2342== Argument 'size' of function malloc has a fishy (possibly negative) value: -5054604063673069568
  15. ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
  16. ==2342== by 0x10A2A7: read_file (m9.c:146)
  17. ==2342== by 0x10A710: main (m9.c:113)
  18. ==2342==
  19. ==2342== Conditional jump or move depends on uninitialised value(s)
  20. ==2342== at 0x4836961: free (vg_replace_malloc.c:530)
  21. ==2342== by 0x10997D: copy_matrix (m9.c:566)
  22. ==2342== by 0x10A2D6: read_file (m9.c:148)
  23. ==2342== by 0x10A710: main (m9.c:113)
  24. ==2342== Uninitialised value was created by a stack allocation
  25. ==2342== at 0x10A213: read_file (m9.c:117)
  26. ==2342==
  27. ==2342== Invalid free() / delete / delete[] / realloc()
  28. ==2342== at 0x48369AB: free (vg_replace_malloc.c:530)
  29. ==2342== by 0x10997D: copy_matrix (m9.c:566)
  30. ==2342== by 0x10A2D6: read_file (m9.c:148)
  31. ==2342== by 0x10A710: main (m9.c:113)
  32. ==2342== Address 0x1 is not stack'd, malloc'd or (recently) free'd
  33. ==2342==
  34. ==2342== Conditional jump or move depends on uninitialised value(s)
  35. ==2342== at 0x10962C: determinant (m9.c:527)
  36. ==2342== by 0x10A2F3: read_file (m9.c:149)
  37. ==2342== by 0x10A710: main (m9.c:113)
  38. ==2342== Uninitialised value was created by a stack allocation
  39. ==2342== at 0x10A213: read_file (m9.c:117)
  40. ==2342==
  41. ==2342== Conditional jump or move depends on uninitialised value(s)
  42. ==2342== at 0x109638: determinant (m9.c:533)
  43. ==2342== by 0x10A2F3: read_file (m9.c:149)
  44. ==2342== by 0x10A710: main (m9.c:113)
  45. ==2342== Uninitialised value was created by a stack allocation
  46. ==2342== at 0x10A213: read_file (m9.c:117)
  47. ==2342==
  48. ==2342== Conditional jump or move depends on uninitialised value(s)
  49. ==2342== at 0x10963E: determinant (m9.c:535)
  50. ==2342== by 0x10A2F3: read_file (m9.c:149)
  51. ==2342== by 0x10A710: main (m9.c:113)
  52. ==2342== Uninitialised value was created by a stack allocation
  53. ==2342== at 0x10A213: read_file (m9.c:117)
  54. ==2342==
  55. ==2342== Conditional jump or move depends on uninitialised value(s)
  56. ==2342== at 0x483572C: malloc (vg_replace_malloc.c:299)
  57. ==2342== by 0x109292: make_struct (m9.c:438)
  58. ==2342== by 0x1096B0: determinant (m9.c:539)
  59. ==2342== by 0x10A2F3: read_file (m9.c:149)
  60. ==2342== by 0x10A710: main (m9.c:113)
  61. ==2342== Uninitialised value was created by a stack allocation
  62. ==2342== at 0x10A213: read_file (m9.c:117)
  63. ==2342==
  64. ==2342== Argument 'size' of function malloc has a fishy (possibly negative) value: -5054605163684874040
  65. ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
  66. ==2342== by 0x109292: make_struct (m9.c:438)
  67. ==2342== by 0x1096B0: determinant (m9.c:539)
  68. ==2342== by 0x10A2F3: read_file (m9.c:149)
  69. ==2342== by 0x10A710: main (m9.c:113)
  70. ==2342==
  71. ==2342== Conditional jump or move depends on uninitialised value(s)
  72. ==2342== at 0x10976F: determinant (m9.c:541)
  73. ==2342== by 0x10A2F3: read_file (m9.c:149)
  74. ==2342== by 0x10A710: main (m9.c:113)
  75. ==2342== Uninitialised value was created by a stack allocation
  76. ==2342== at 0x10A213: read_file (m9.c:117)
  77. ==2342==
  78. ==2342== Conditional jump or move depends on uninitialised value(s)
  79. ==2342== at 0x109711: determinant (m9.c:545)
  80. ==2342== by 0x10A2F3: read_file (m9.c:149)
  81. ==2342== by 0x10A710: main (m9.c:113)
  82. ==2342== Uninitialised value was created by a stack allocation
  83. ==2342== at 0x10A213: read_file (m9.c:117)
  84. ==2342==
  85. ==2342== Conditional jump or move depends on uninitialised value(s)
  86. ==2342== at 0x1096CC: determinant (m9.c:548)
  87. ==2342== by 0x10A2F3: read_file (m9.c:149)
  88. ==2342== by 0x10A710: main (m9.c:113)
  89. ==2342== Uninitialised value was created by a stack allocation
  90. ==2342== at 0x10A213: read_file (m9.c:117)
  91. ==2342==
  92. ==2342== Use of uninitialised value of size 8
  93. ==2342== at 0x1096F7: determinant (m9.c:552)
  94. ==2342== by 0x10A2F3: read_file (m9.c:149)
  95. ==2342== by 0x10A710: main (m9.c:113)
  96. ==2342== Uninitialised value was created by a stack allocation
  97. ==2342== at 0x10A213: read_file (m9.c:117)
  98. ==2342==
  99. ==2342== Invalid read of size 8
  100. ==2342== at 0x1096F7: determinant (m9.c:552)
  101. ==2342== by 0x10A2F3: read_file (m9.c:149)
  102. ==2342== by 0x10A710: main (m9.c:113)
  103. ==2342== Address 0x2024d004a8 is not stack'd, malloc'd or (recently) free'd
  104. ==2342==
  105. ==2342==
  106. ==2342== Process terminating with default action of signal 11 (SIGSEGV)
  107. ==2342== Access not within mapped region at address 0x2024D004A8
  108. ==2342== at 0x1096F7: determinant (m9.c:552)
  109. ==2342== by 0x10A2F3: read_file (m9.c:149)
  110. ==2342== by 0x10A710: main (m9.c:113)
  111. ==2342== If you believe this happened as a result of a stack
  112. ==2342== overflow in your program's main thread (unlikely but
  113. ==2342== possible), you can try to increase the size of the
  114. ==2342== main thread stack using the --main-stacksize= flag.
  115. ==2342== The main thread stack size used in this run was 8388608.
  116. ==2342==
  117. ==2342== HEAP SUMMARY:
  118. ==2342== in use at exit: 624 bytes in 2 blocks
  119. ==2342== total heap usage: 3 allocs, 2 frees, 4,720 bytes allocated
  120. ==2342==
  121. ==2342== 72 bytes in 1 blocks are still reachable in loss record 1 of 2
  122. ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
  123. ==2342== by 0x10A32B: read_file (m9.c:156)
  124. ==2342== by 0x10A710: main (m9.c:113)
  125. ==2342==
  126. ==2342== 552 bytes in 1 blocks are still reachable in loss record 2 of 2
  127. ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
  128. ==2342== by 0x4A4C0FA: __fopen_internal (iofopen.c:65)
  129. ==2342== by 0x10A6C5: main (m9.c:94)
  130. ==2342==
  131. ==2342== LEAK SUMMARY:
  132. ==2342== definitely lost: 0 bytes in 0 blocks
  133. ==2342== indirectly lost: 0 bytes in 0 blocks
  134. ==2342== possibly lost: 0 bytes in 0 blocks
  135. ==2342== still reachable: 624 bytes in 2 blocks
  136. ==2342== suppressed: 0 bytes in 0 blocks
  137. ==2342==
  138. ==2342== For counts of detected and suppressed errors, rerun with: -v
  139. ==2342== ERROR SUMMARY: 15 errors from 14 contexts (suppressed: 0 from 0)
  140. Segmentation fault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement