Skip to content

Instantly share code, notes, and snippets.

@stephenmathieson
Created August 24, 2015 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenmathieson/7096a33ee4c8322a5299 to your computer and use it in GitHub Desktop.
Save stephenmathieson/7096a33ee4c8322a5299 to your computer and use it in GitHub Desktop.
$ valgrind --leak-check=full ./test
==5700== Memcheck, a memory error detector
==5700== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==5700== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==5700== Command: ./test
==5700==
# Test: parse_simple
OK
# Test: parse_major
OK
# Test: parse_minor
OK
# Test: parse_prerelease
OK
# Test: parse_metadata
OK
# Test: parse_prerelease_metadata
OK
# Test: semver_compare
OK
# Test: semver_compare_full
==5700== Invalid write of size 1
==5700== at 0x4C2BDAC: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f0fc9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDBF: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f0fca is 1 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDAC: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1069 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDBF: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f106a is 1 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid read of size 1
==5700== at 0x4013FC: compare_metadata_stage (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401564: semver_compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4011A2: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f0fc9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid read of size 1
==5700== at 0x401429: compare_metadata_stage (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401564: semver_compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4011A2: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1069 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4012B4: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDAC: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1929 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDBF: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f192f is 6 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDAC: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1bf9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 1
==5700== at 0x4C2BDBF: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1bff is 6 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid read of size 1
==5700== at 0x4013FC: compare_metadata_stage (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401564: semver_compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4011A2: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1bf9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4010FA: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid read of size 1
==5700== at 0x401429: compare_metadata_stage (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401564: semver_compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4011A2: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f1ce9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid write of size 2
==5700== at 0x401026: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f20b8 is 8 bytes inside a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== Invalid read of size 1
==5700== at 0x4C2BD94: __GI_strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x40103E: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== Address 0x51f20b9 is 0 bytes after a block of size 9 alloc'd
==5700== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400FE3: semver_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40113F: compare_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401319: semver_compare (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401F3C: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
OK
# Test: semver_gt
OK
# Test: semver_lt
OK
# Test: semver_eq
OK
# Test: semver_neq
OK
# Test: semver_gte
OK
# Test: semver_lte
OK
# Test: semver_satisfies
OK
# Test: render
OK
# Test: bump
OK
# Test: bump_minor
OK
# Test: bump_patch
OK
# Test: free
OK
# Test: valid_chars
OK
==5700==
==5700== HEAP SUMMARY:
==5700== in use at exit: 566 bytes in 55 blocks
==5700== total heap usage: 116 allocs, 61 frees, 1,067 bytes allocated
==5700==
==5700== 8 bytes in 1 blocks are definitely lost in loss record 1 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400DA8: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40263B: test_parse_prerelerease_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4032F7: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 15 bytes in 1 blocks are definitely lost in loss record 2 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400DA8: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402345: test_parse_prerelease (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4032E3: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 15 bytes in 1 blocks are definitely lost in loss record 3 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400D87: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4024B9: test_parse_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4032ED: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 15 bytes in 1 blocks are definitely lost in loss record 4 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400D87: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40263B: test_parse_prerelerease_metadata (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x4032F7: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 85 bytes in 6 blocks are definitely lost in loss record 5 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400D87: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401EDC: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 94 bytes in 7 blocks are definitely lost in loss record 6 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400D87: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401EEF: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 161 bytes in 19 blocks are definitely lost in loss record 7 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400DA8: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401EDC: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== 173 bytes in 19 blocks are definitely lost in loss record 8 of 8
==5700== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5700== by 0x400C18: parse_slice (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x400DA8: semver_parse (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401EEF: compare_helper (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x401FC3: suite_runner (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x402820: test_compare_full (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700== by 0x40330B: main (in /home/stephen/repos/github.com/h2non/semver.c/test)
==5700==
==5700== LEAK SUMMARY:
==5700== definitely lost: 566 bytes in 55 blocks
==5700== indirectly lost: 0 bytes in 0 blocks
==5700== possibly lost: 0 bytes in 0 blocks
==5700== still reachable: 0 bytes in 0 blocks
==5700== suppressed: 0 bytes in 0 blocks
==5700==
==5700== For counts of detected and suppressed errors, rerun with: -v
==5700== ERROR SUMMARY: 95 errors from 22 contexts (suppressed: 2 from 2)
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment