Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [louis@louis CPE_pushswap_2018]$ valgrind ./push_swap 2 1 3 6 5 8 | cat -e
- ==3939== Memcheck, a memory error detector
- ==3939== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==3939== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
- ==3939== Command: ./push_swap 2 1 3 6 5 8
- ==3939==
- ==3939== Invalid read of size 8
- ==3939== at 0x4007E0: my_put_element (in /home/louis/epitech/tek1/semester1/B-CPE-110/CPE_pushswap_2018/push_swap)
- ==3939== by 0x40074A: main (in /home/louis/epitech/tek1/semester1/B-CPE-110/CPE_pushswap_2018/push_swap)
- ==3939== Address 0x0 is not stack'd, malloc'd or (recently) free'd
- ==3939==
- ==3939==
- ==3939== Process terminating with default action of signal 11 (SIGSEGV): dumping core
- ==3939== Access not within mapped region at address 0x0
- ==3939== at 0x4007E0: my_put_element (in /home/louis/epitech/tek1/semester1/B-CPE-110/CPE_pushswap_2018/push_swap)
- ==3939== by 0x40074A: main (in /home/louis/epitech/tek1/semester1/B-CPE-110/CPE_pushswap_2018/push_swap)
- ==3939== If you believe this happened as a result of a stack
- ==3939== overflow in your program's main thread (unlikely but
- ==3939== possible), you can try to increase the size of the
- ==3939== main thread stack using the --main-stacksize= flag.
- ==3939== The main thread stack size used in this run was 8388608.
- OK$
- ==3939==
- ==3939== HEAP SUMMARY:
- ==3939== in use at exit: 16 bytes in 1 blocks
- ==3939== total heap usage: 2 allocs, 1 frees, 4,112 bytes allocated
- ==3939==
- ==3939== LEAK SUMMARY:
- ==3939== definitely lost: 0 bytes in 0 blocks
- ==3939== indirectly lost: 0 bytes in 0 blocks
- ==3939== possibly lost: 0 bytes in 0 blocks
- ==3939== still reachable: 16 bytes in 1 blocks
- ==3939== suppressed: 0 bytes in 0 blocks
- ==3939== Rerun with --leak-check=full to see details of leaked memory
- ==3939==
- ==3939== For counts of detected and suppressed errors, rerun with: -v
- ==3939== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement