Ferramentas do usuário

Ferramentas do site


prog2:depuracao

Diferenças

Aqui você vê as diferenças entre duas revisões dessa página.

Link para esta página de comparações

Ambos lados da revisão anterior Revisão anterior
prog2:depuracao [2019/10/09 15:26]
maziero
prog2:depuracao [2019/10/09 15:30] (atual)
maziero
Linha 157: Linha 157:
     printf ("x vale zero\n"​) ;     printf ("x vale zero\n"​) ;
  
-  // erro 3: liberar duas vezes a mesma área (double free) 
   free (vet2) ;   free (vet2) ;
 +
 +  // erro 3: liberar duas vezes a mesma área (double free)
   free (vet2) ;   free (vet2) ;
  
Linha 199: Linha 200:
 ==29519== Invalid free() / delete / delete[] / realloc() ==29519== Invalid free() / delete / delete[] / realloc()
 ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so) ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so)
-==29519== ​   by 0x108727: main (errors.c:23)+==29519== ​   by 0x108727: main (errors.c:24)
 ==29519== ​ Address 0x522d210 is 0 bytes inside a block of size 400 free'd ==29519== ​ Address 0x522d210 is 0 bytes inside a block of size 400 free'd
 ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so) ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so)
-==29519== ​   by 0x10871B: main (errors.c:22)+==29519== ​   by 0x10871B: main (errors.c:21)
 ==29519== ​ Block was alloc'​d at ==29519== ​ Block was alloc'​d at
 ==29519== ​   at 0x4C2FB0F: malloc (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so) ==29519== ​   at 0x4C2FB0F: malloc (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so)
Linha 212: Linha 213:
 <​code>​ <​code>​
 ==29519== Invalid write of size 4 ==29519== Invalid write of size 4
-==29519== ​   at 0x10872C: main (errors.c:26)+==29519== ​   at 0x10872C: main (errors.c:27)
 ==29519== ​ Address 0x522d210 is 0 bytes inside a block of size 400 free'd ==29519== ​ Address 0x522d210 is 0 bytes inside a block of size 400 free'd
 ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so) ==29519== ​   at 0x4C30D3B: free (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so)
-==29519== ​   by 0x10871B: main (errors.c:22)+==29519== ​   by 0x10871B: main (errors.c:21)
 ==29519== ​ Block was alloc'​d at ==29519== ​ Block was alloc'​d at
 ==29519== ​   at 0x4C2FB0F: malloc (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so) ==29519== ​   at 0x4C2FB0F: malloc (in /​usr/​lib/​valgrind/​vgpreload_memcheck-amd64-linux.so)
prog2/depuracao.txt · Última modificação: 2019/10/09 15:30 por maziero