Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all ./foo matrix 3
- ==2342== Memcheck, a memory error detector
- ==2342== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==2342== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
- ==2342== Command: ./foo matrix 3
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x483572C: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x10A2A7: read_file (m9.c:146)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Argument 'size' of function malloc has a fishy (possibly negative) value: -5054604063673069568
- ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x10A2A7: read_file (m9.c:146)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x4836961: free (vg_replace_malloc.c:530)
- ==2342== by 0x10997D: copy_matrix (m9.c:566)
- ==2342== by 0x10A2D6: read_file (m9.c:148)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Invalid free() / delete / delete[] / realloc()
- ==2342== at 0x48369AB: free (vg_replace_malloc.c:530)
- ==2342== by 0x10997D: copy_matrix (m9.c:566)
- ==2342== by 0x10A2D6: read_file (m9.c:148)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Address 0x1 is not stack'd, malloc'd or (recently) free'd
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x10962C: determinant (m9.c:527)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x109638: determinant (m9.c:533)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x10963E: determinant (m9.c:535)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x483572C: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x109292: make_struct (m9.c:438)
- ==2342== by 0x1096B0: determinant (m9.c:539)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Argument 'size' of function malloc has a fishy (possibly negative) value: -5054605163684874040
- ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x109292: make_struct (m9.c:438)
- ==2342== by 0x1096B0: determinant (m9.c:539)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x10976F: determinant (m9.c:541)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x109711: determinant (m9.c:545)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Conditional jump or move depends on uninitialised value(s)
- ==2342== at 0x1096CC: determinant (m9.c:548)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Use of uninitialised value of size 8
- ==2342== at 0x1096F7: determinant (m9.c:552)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Uninitialised value was created by a stack allocation
- ==2342== at 0x10A213: read_file (m9.c:117)
- ==2342==
- ==2342== Invalid read of size 8
- ==2342== at 0x1096F7: determinant (m9.c:552)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== Address 0x2024d004a8 is not stack'd, malloc'd or (recently) free'd
- ==2342==
- ==2342==
- ==2342== Process terminating with default action of signal 11 (SIGSEGV)
- ==2342== Access not within mapped region at address 0x2024D004A8
- ==2342== at 0x1096F7: determinant (m9.c:552)
- ==2342== by 0x10A2F3: read_file (m9.c:149)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342== If you believe this happened as a result of a stack
- ==2342== overflow in your program's main thread (unlikely but
- ==2342== possible), you can try to increase the size of the
- ==2342== main thread stack using the --main-stacksize= flag.
- ==2342== The main thread stack size used in this run was 8388608.
- ==2342==
- ==2342== HEAP SUMMARY:
- ==2342== in use at exit: 624 bytes in 2 blocks
- ==2342== total heap usage: 3 allocs, 2 frees, 4,720 bytes allocated
- ==2342==
- ==2342== 72 bytes in 1 blocks are still reachable in loss record 1 of 2
- ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x10A32B: read_file (m9.c:156)
- ==2342== by 0x10A710: main (m9.c:113)
- ==2342==
- ==2342== 552 bytes in 1 blocks are still reachable in loss record 2 of 2
- ==2342== at 0x483577F: malloc (vg_replace_malloc.c:299)
- ==2342== by 0x4A4C0FA: __fopen_internal (iofopen.c:65)
- ==2342== by 0x10A6C5: main (m9.c:94)
- ==2342==
- ==2342== LEAK SUMMARY:
- ==2342== definitely lost: 0 bytes in 0 blocks
- ==2342== indirectly lost: 0 bytes in 0 blocks
- ==2342== possibly lost: 0 bytes in 0 blocks
- ==2342== still reachable: 624 bytes in 2 blocks
- ==2342== suppressed: 0 bytes in 0 blocks
- ==2342==
- ==2342== For counts of detected and suppressed errors, rerun with: -v
- ==2342== ERROR SUMMARY: 15 errors from 14 contexts (suppressed: 0 from 0)
- Segmentation fault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement