public
Authored by avatar Ignacio Ianello

ERROR_TP1C

Estamos teniendo invalid write size y no entendemos por que

log_bug 4.54 KiB
make valgrind_asm
valgrind  --show-reachable=yes --leak-check=full --error-exitcode=1 ./test_asm \
&& echo "No se detectaron errores de memoria"
==60985== Memcheck, a memory error detector
==60985== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==60985== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==60985== Command: ./test_asm
==60985== 
==60985== Invalid write of size 8
==60985==    at 0x413907: ??? (ej1.asm:229)
==60985==    by 0x413671: ej1_do_test (ej1_tests.c:36)
==60985==    by 0x4137D5: test_ej1 (ej1_tests.c:68)
==60985==    by 0x413317: main (test.c:39)
==60985==  Address 0x4f0d240 is 0 bytes after a block of size 1,228,800 alloc'd
==60985==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==60985==    by 0x413658: ej1_do_test (ej1_tests.c:34)
==60985==    by 0x4137D5: test_ej1 (ej1_tests.c:68)
==60985==    by 0x413317: main (test.c:39)
==60985== 
==60985== Invalid read of size 16
==60985==    at 0x41388A: ??? (ej1.asm:154)
==60985==    by 0x413671: ej1_do_test (ej1_tests.c:36)
==60985==    by 0x4137D5: test_ej1 (ej1_tests.c:68)
==60985==    by 0x413317: main (test.c:39)
==60985==  Address 0x4ddfdc0 is 0 bytes after a block of size 1,228,800 alloc'd
==60985==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==60985==    by 0x408681: stbi__malloc (stb_image.h:987)
==60985==    by 0x4086B7: stbi__malloc_mad3 (stb_image.h:1058)
==60985==    by 0x409796: stbi__create_png_image_raw (stb_image.h:4712)
==60985==    by 0x409EDE: stbi__create_png_image (stb_image.h:4868)
==60985==    by 0x4100C4: stbi__parse_png_file (stb_image.h:5214)
==60985==    by 0x410951: stbi__do_png (stb_image.h:5267)
==60985==    by 0x410A96: stbi__png_load (stb_image.h:5299)
==60985==    by 0x410BA3: stbi__load_main (stb_image.h:1147)
==60985==    by 0x410CDB: stbi__load_and_postprocess_8bit (stb_image.h:1263)
==60985==    by 0x410E07: stbi_load_from_file (stb_image.h:1381)
==60985==    by 0x410E9E: stbi_load (stb_image.h:1371)
==60985== 
==60985== 
==60985== Process terminating with default action of signal 11 (SIGSEGV)
==60985==  Access not within mapped region at address 0x4F82000
==60985==    at 0x413907: ??? (ej1.asm:229)
==60985==    by 0x413671: ej1_do_test (ej1_tests.c:36)
==60985==    by 0x4137D5: test_ej1 (ej1_tests.c:68)
==60985==    by 0x413317: main (test.c:39)
==60985==  If you believe this happened as a result of a stack
==60985==  overflow in your program's main thread (unlikely but
==60985==  possible), you can try to increase the size of the
==60985==  main thread stack using the --main-stacksize= flag.
==60985==  The main thread stack size used in this run was 8388608.
==60985== 
==60985== HEAP SUMMARY:
==60985==     in use at exit: 2,457,600 bytes in 2 blocks
==60985==   total heap usage: 7 allocs, 5 frees, 3,715,178 bytes allocated
==60985== 
==60985== 1,228,800 bytes in 1 blocks are still reachable in loss record 1 of 2
==60985==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==60985==    by 0x408681: stbi__malloc (stb_image.h:987)
==60985==    by 0x4086B7: stbi__malloc_mad3 (stb_image.h:1058)
==60985==    by 0x409796: stbi__create_png_image_raw (stb_image.h:4712)
==60985==    by 0x409EDE: stbi__create_png_image (stb_image.h:4868)
==60985==    by 0x4100C4: stbi__parse_png_file (stb_image.h:5214)
==60985==    by 0x410951: stbi__do_png (stb_image.h:5267)
==60985==    by 0x410A96: stbi__png_load (stb_image.h:5299)
==60985==    by 0x410BA3: stbi__load_main (stb_image.h:1147)
==60985==    by 0x410CDB: stbi__load_and_postprocess_8bit (stb_image.h:1263)
==60985==    by 0x410E07: stbi_load_from_file (stb_image.h:1381)
==60985==    by 0x410E9E: stbi_load (stb_image.h:1371)
==60985== 
==60985== 1,228,800 bytes in 1 blocks are definitely lost in loss record 2 of 2
==60985==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==60985==    by 0x413658: ej1_do_test (ej1_tests.c:34)
==60985==    by 0x4137D5: test_ej1 (ej1_tests.c:68)
==60985==    by 0x413317: main (test.c:39)
==60985== 
==60985== LEAK SUMMARY:
==60985==    definitely lost: 1,228,800 bytes in 1 blocks
==60985==    indirectly lost: 0 bytes in 0 blocks
==60985==      possibly lost: 0 bytes in 0 blocks
==60985==    still reachable: 1,228,800 bytes in 1 blocks
==60985==         suppressed: 0 bytes in 0 blocks
==60985== 
==60985== For lists of detected and suppressed errors, rerun with: -s
==60985== ERROR SUMMARY: 60163 errors from 3 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
make: *** [Makefile:24: valgrind_asm] Error 139
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment