Untitled

 avatar
unknown
powershell
2 years ago
2.8 kB
5
Indexable

==15122== Argument 'size' of function malloc has a fishy (possibly negative) value: -67110400
==15122==    at 0x484586F: malloc (vg_replace_malloc.c:381)
==15122==    by 0x401BA3: initialize_struct (struct.c:22)
==15122==    by 0x40136B: main (main.c:51)
==15122== 
==15122== Invalid write of size 8
==15122==    at 0x401BA4: initialize_struct (struct.c:22)
==15122==    by 0x40136B: main (main.c:51)
==15122==  Address 0x4a751a8 is 248 bytes inside a block of size 249 alloc'd
==15122==    at 0x484586F: malloc (vg_replace_malloc.c:381)
==15122==    by 0x401B64: initialize_struct (struct.c:20)
==15122==    by 0x40136B: main (main.c:51)
==15122== 
==15122== Invalid read of size 8
==15122==    at 0x401BC3: initialize_struct (struct.c:23)
==15122==    by 0x40136B: main (main.c:51)
==15122==  Address 0x4a74fd0 is 8 bytes after a block of size 8 alloc'd
==15122==    at 0x484586F: malloc (vg_replace_malloc.c:381)
==15122==    by 0x401FF4: my_str_to_word_array (my_str_to_word_array.c:43)
==15122==    by 0x401ADB: initialize_struct (struct.c:12)
==15122==    by 0x40136B: main (main.c:51)
==15122== 
==15122== Invalid read of size 1
==15122==    at 0x401EAB: my_strlen (my_strlen.c:12)
==15122==    by 0x401BCD: initialize_struct (struct.c:23)
==15122==    by 0x40136B: main (main.c:51)
==15122==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==15122== 
==15122== 
==15122== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==15122==  Access not within mapped region at address 0x0
==15122==    at 0x401EAB: my_strlen (my_strlen.c:12)
==15122==    by 0x401BCD: initialize_struct (struct.c:23)
==15122==    by 0x40136B: main (main.c:51)
==15122==  If you believe this happened as a result of a stack
==15122==  overflow in your program's main thread (unlikely but
==15122==  possible), you can try to increase the size of the
==15122==  main thread stack using the --main-stacksize= flag.
==15122==  The main thread stack size used in this run was 8388608.
==15122== 
==15122== HEAP SUMMARY:
==15122==     in use at exit: 20,469 bytes in 6 blocks
==15122==   total heap usage: 6 allocs, 0 frees, 20,469 bytes allocated
==15122== 
==15122== LEAK SUMMARY:
==15122==    definitely lost: 20,219 bytes in 4 blocks
==15122==    indirectly lost: 1 bytes in 1 blocks
==15122==      possibly lost: 0 bytes in 0 blocks
==15122==    still reachable: 249 bytes in 1 blocks
==15122==         suppressed: 0 bytes in 0 blocks
==15122== Rerun with --leak-check=full to see details of leaked memory
==15122== 
==15122== Use --track-origins=yes to see where uninitialised values come from
==15122== For lists of detected and suppressed errors, rerun with: -s
==15122== ERROR SUMMARY: 103 errors from 9 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Editor is loading...