Skip to content

Instantly share code, notes, and snippets.

@andy5995
Created December 17, 2017 05:56
Show Gist options
  • Save andy5995/cdc4342cb09200c7e6b4a56f8de67043 to your computer and use it in GitHub Desktop.
Save andy5995/cdc4342cb09200c7e6b4a56f8de67043 to your computer and use it in GitHub Desktop.
valgrind --leak-check=full src/simplecgen
==6184== Memcheck, a memory error detector
==6184== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==6184== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==6184== Command: src/simplecgen
==6184==
processing infiles/hts_form.sct
==6184== Invalid read of size 1
==6184== at 0x109165: main (simplecgen.c:240)
==6184== Address 0x51e54e0 is 0 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid read of size 1
==6184== at 0x10917E: main (simplecgen.c:240)
==6184== Address 0x51e76c0 is 0 bytes inside a block of size 9,108 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10915C: main (simplecgen.c:238)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109151: main (simplecgen.c:237)
==6184==
==6184== Invalid read of size 1
==6184== at 0x4C2EDA2: strlen (vg_replace_strmem.c:454)
==6184== by 0x4E80D77: vfprintf (vfprintf.c:1637)
==6184== by 0x4EA1ACA: vsprintf (iovsprintf.c:42)
==6184== by 0x4E87326: sprintf (sprintf.c:32)
==6184== by 0x1091AF: main (simplecgen.c:242)
==6184== Address 0x51e54e0 is 0 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid read of size 1
==6184== at 0x4C2EDB4: strlen (vg_replace_strmem.c:454)
==6184== by 0x4E80D77: vfprintf (vfprintf.c:1637)
==6184== by 0x4EA1ACA: vsprintf (iovsprintf.c:42)
==6184== by 0x4E87326: sprintf (sprintf.c:32)
==6184== by 0x1091AF: main (simplecgen.c:242)
==6184== Address 0x51e54e1 is 1 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid read of size 1
==6184== at 0x4C330A8: __GI_mempcpy (vg_replace_strmem.c:1518)
==6184== by 0x4EACBFD: _IO_default_xsputn (genops.c:438)
==6184== by 0x4E80BBA: vfprintf (vfprintf.c:1637)
==6184== by 0x4EA1ACA: vsprintf (iovsprintf.c:42)
==6184== by 0x4E87326: sprintf (sprintf.c:32)
==6184== by 0x1091AF: main (simplecgen.c:242)
==6184== Address 0x51e56a7 is 455 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid read of size 1
==6184== at 0x4C330B8: __GI_mempcpy (vg_replace_strmem.c:1518)
==6184== by 0x4EACBFD: _IO_default_xsputn (genops.c:438)
==6184== by 0x4E80BBA: vfprintf (vfprintf.c:1637)
==6184== by 0x4EA1ACA: vsprintf (iovsprintf.c:42)
==6184== by 0x4E87326: sprintf (sprintf.c:32)
==6184== by 0x1091AF: main (simplecgen.c:242)
==6184== Address 0x51e56a5 is 453 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid free() / delete / delete[] / realloc()
==6184== at 0x4C2CDDB: free (vg_replace_malloc.c:530)
==6184== by 0x109264: main (simplecgen.c:265)
==6184== Address 0x51e54e0 is 0 bytes inside a block of size 457 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109130: main (simplecgen.c:234)
==6184==
==6184== Invalid free() / delete / delete[] / realloc()
==6184== at 0x4C2CDDB: free (vg_replace_malloc.c:530)
==6184== by 0x10926C: main (simplecgen.c:266)
==6184== Address 0x51e76c0 is 0 bytes inside a block of size 9,108 free'd
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10915C: main (simplecgen.c:238)
==6184== Block was alloc'd at
==6184== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==6184== by 0x109729: str_replace (template_functions.c:106)
==6184== by 0x109C5D: my_render_template (template_functions.c:232)
==6184== by 0x109DC4: my_render_template_file (template_functions.c:257)
==6184== by 0x109DFE: render_template_file (template_functions.c:264)
==6184== by 0x109151: main (simplecgen.c:237)
==6184==
processing infiles/hts_selectors.sct
processing infiles/rundig.sct
processing infiles/attrs.sct
processing infiles/running.sct
processing infiles/hts_general.sct
processing infiles/hts_templates.sct
processing infiles/htstat.sct
processing infiles/where.sct
processing infiles/all.sct
processing infiles/index.sct
processing infiles/htdig.sct
processing infiles/require.sct
processing infiles/config.sct
processing infiles/hts_method.sct
processing infiles/htsearch.sct
==6184==
==6184== HEAP SUMMARY:
==6184== in use at exit: 446,048 bytes in 32 blocks
==6184== total heap usage: 309 allocs, 309 frees, 1,775,012 bytes allocated
==6184==
==6184== 7,080 bytes in 16 blocks are definitely lost in loss record 1 of 2
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10913B: main (simplecgen.c:235)
==6184==
==6184== 438,968 bytes in 16 blocks are definitely lost in loss record 2 of 2
==6184== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==6184== by 0x10967C: add_newline (simplecgen.c:347)
==6184== by 0x10915C: main (simplecgen.c:238)
==6184==
==6184== LEAK SUMMARY:
==6184== definitely lost: 446,048 bytes in 32 blocks
==6184== indirectly lost: 0 bytes in 0 blocks
==6184== possibly lost: 0 bytes in 0 blocks
==6184== still reachable: 0 bytes in 0 blocks
==6184== suppressed: 0 bytes in 0 blocks
==6184==
==6184== For counts of detected and suppressed errors, rerun with: -v
==6184== ERROR SUMMARY: 1338050 errors from 10 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment