Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [noah@silverstar logbook]$ valgrind ./test
- ==3129== Memcheck, a memory error detector
- ==3129== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
- ==3129== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
- ==3129== Command: ./test
- ==3129==
- ==3129== Conditional jump or move depends on uninitialised value(s)
- ==3129== at 0x4027D3D: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==3129== by 0x80486AE: xrealloc (utils.c:30)
- ==3129== by 0x8048942: cpy (utils.c:71)
- ==3129== by 0x8048594: main (test.c:9)
- ==3129==
- ==3129== Invalid free() / delete / delete[]
- ==3129== at 0x4027D82: realloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==3129== by 0x80486AE: xrealloc (utils.c:30)
- ==3129== by 0x8048942: cpy (utils.c:71)
- ==3129== by 0x8048594: main (test.c:9)
- ==3129== Address 0x4081f35 is in the Text segment of /lib/libc-2.14.so
- ==3129==
- ./test: Could not reallocate space!
- ==3129== Invalid write of size 1
- ==3129== at 0x402865A: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==3129== by 0x8048966: cpy (utils.c:73)
- ==3129== by 0x8048594: main (test.c:9)
- ==3129== Address 0x0 is not stack'd, malloc'd or (recently) free'd
- ==3129==
- ==3129==
- ==3129== Process terminating with default action of signal 11 (SIGSEGV)
- ==3129== Access not within mapped region at address 0x0
- ==3129== at 0x402865A: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==3129== by 0x8048966: cpy (utils.c:73)
- ==3129== by 0x8048594: main (test.c:9)
- ==3129== If you believe this happened as a result of a stack
- ==3129== overflow in your program's main thread (unlikely but
- ==3129== possible), you can try to increase the size of the
- ==3129== main thread stack using the --main-stacksize= flag.
- ==3129== The main thread stack size used in this run was 8388608.
- ==3129==
- ==3129== HEAP SUMMARY:
- ==3129== in use at exit: 0 bytes in 0 blocks
- ==3129== total heap usage: 1 allocs, 1 frees, 7 bytes allocated
- ==3129==
- ==3129== All heap blocks were freed -- no leaks are possible
- ==3129==
- ==3129== For counts of detected and suppressed errors, rerun with: -v
- ==3129== Use --track-origins=yes to see where uninitialised values come from
- ==3129== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 13 from 8)
- Speicherzugriffsfehler
Advertisement
Add Comment
Please, Sign In to add comment