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