Skip to content

Instantly share code, notes, and snippets.

@Xliff
Created August 7, 2020 20:47
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 Xliff/cc82f1361d2b0237e2b81fa4a1c41c22 to your computer and use it in GitHub Desktop.
Save Xliff/cc82f1361d2b0237e2b81fa4a1c41c22 to your computer and use it in GitHub Desktop.
Vagrind Output
Running perl6 script in valgrind mode...
================================================================================================
This is Rakudo running in valgrind, a tool for debugging and profiling programs.
Running a program in valgrind usually takes *a lot* more time than running it directly,
so please be patient.
Valgrind options can be added with MVM_VALGRIND_OPTS environment variable.

This Rakudo version is 2020.07.52.gfcfc.60.b.63 built on MoarVM version 2020.07.5.g.0.c.33.c.5380,
running on ubuntu (20.04.1.LTS.Focal.Fossa) / linux
------------------------------------------------------------------------------------------------
==646085== Memcheck, a memory error detector
==646085== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==646085== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==646085== Command: /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/bin/rakudo-m --stagestats -I/home/cbwood/Other_Projects/Method-Also/lib -I/home/cbwood/Projects/p6-GLib/lib -I/home/cbwood/Projects/p6-Pango/lib -I/home/cbwood/Projects/p6-GIO/lib -I/home/cbwood/Projects/p6-GDK/lib -I/home/cbwood/Projects/p6-GtkPlus/lib -I/home/cbwood/Projects/p6-WebkitGTK/lib -I/home/cbwood/Projects/p6-SourceViewGTK/lib -I/home/cbwood/Projects/p6-AMTK/lib -I/home/cbwood/Projects/p6-TEPL/lib -I/home/cbwood/Projects/p6-GooCanvas/lib -I/home/cbwood/Projects/p6-Slope/lib -I/home/cbwood/Projects/p6-WNCK/lib -I/home/cbwood/Projects/p6-Clutter/lib -I/home/cbwood/Projects/p6-GtkClutter/lib -I/home/cbwood/Projects/p6-COGL/lib -I/home/cbwood/Projects/p6-GStreamer/lib -I/home/cbwood/Projects/p6-RSVG/lib -I/home/cbwood/Projects/p6-GtkSheet/lib -I/home/cbwood/Projects/p6-VTE/lib -Ilib -Ibin t/08-parser.t
==646085== 
Stage start      :   0.002
Stage parse      :  89.453
Stage syntaxcheck:   0.000
Stage ast        :   0.000
Stage optimize   :   1.902
Stage mast       :   3.253
Stage mbc        :   0.549
Stage moar       :   0.000
    ok 1 - Parser created successfully
    ok 2 - Parser returned a NULL value for empty-string
    ok 3 - Immutable Parser created successfully
    ok 4 - Parser returned a NULL value for empty-string
    1..4
ok 1 - Empty with Parser
    ok 1 - Parser created successfully
    ok 2 - 'null' - root node was obtained successfully
    ok 3 - 'null' - root node has no parent
    ok 4 - 'null' - root node is of the expected type
    ok 5 - '42' - root node was obtained successfully
    ok 6 - '42' - root node has no parent
    ok 7 - '42' - root node is of the expected type
    ok 8 - '42' - root node satisfies validation test
    ok 9 - 'True' - root node was obtained successfully
    ok 10 - 'True' - root node has no parent
    ok 11 - 'True' - root node is of the expected type
    ok 12 - 'True' - root node satisfies validation test
    ok 13 - '"string"' - root node was obtained successfully
    ok 14 - '"string"' - root node has no parent
    ok 15 - '"string"' - root node is of the expected type
    ok 16 - '"string"' - root node satisfies validation test
    ok 17 - '10200' - root node was obtained successfully
    ok 18 - '10200' - root node has no parent
    ok 19 - '10200' - root node is of the expected type
    ok 20 - '10200' - root node satisfies validation test
    ok 21 - '-1' - root node was obtained successfully
    ok 22 - '-1' - root node has no parent
    ok 23 - '-1' - root node is of the expected type
    ok 24 - '-1' - root node satisfies validation test
    ok 25 - '-3.14' - root node was obtained successfully
    ok 26 - '-3.14' - root node has no parent
    ok 27 - '-3.14' - root node is of the expected type
    ok 28 - '-3.14' - root node satisfies validation test
    1..28
ok 2 - Base Value
    ok 1 - Parser created successfully
    ok 2 - Root node was obtained successfully
    ok 3 - Root node is an ARRAY node
    ok 4 - Root node has no parent
    ok 5 - Array node at root is NOT Nil
    ok 6 - Array node has 0 length
    1..6
ok 3 - Empty Array
    ok 1 - Parser created successfully
    # '[ true ]'
    ok 2 - Root node was obtained successfully
    ok 3 - Root node has no parent
    ok 4 - Array node at root is NOT Nil
    ok 5 - Parsed array length agrees with expected result
    ok 6 - Node at Element 0 is NOT Nil
    ok 7 - Parent node is the root node
    ok 8 - Node type agrees with expected result
    ok 9 - Value type agrees with expected result
    # '[ true, false, null ]'
    ok 10 - Root node was obtained successfully
    ok 11 - Root node has no parent
    ok 12 - Array node at root is NOT Nil
    ok 13 - Parsed array length agrees with expected result
    ok 14 - Node at Element 2 is NOT Nil
    ok 15 - Parent node is the root node
    ok 16 - Node type agrees with expected result
    ok 17 - Value type agrees with expected result
    # '[ 1, 2, 3.14, "test" ]'
    ok 18 - Root node was obtained successfully
    ok 19 - Root node has no parent
    ok 20 - Array node at root is NOT Nil
    ok 21 - Parsed array length agrees with expected result
    ok 22 - Node at Element 3 is NOT Nil
    ok 23 - Parent node is the root node
    ok 24 - Node type agrees with expected result
    ok 25 - Value type agrees with expected result
    1..25
ok 4 - Simple Array
    ok 1 - Parser created successfully
    # [ 42, [ ], null ]
    ok 2 - Root node was obtained successfully
    ok 3 - Root node has no parent
    ok 4 - Array has a non-zero length
    # [ [ ], [ true, [ true ] ] ]
    ok 5 - Root node was obtained successfully
    ok 6 - Root node has no parent
    ok 7 - Array has a non-zero length
    # [ [ false, true, 42 ], [ true, false, 3.14 ], "test" ]
    ok 8 - Root node was obtained successfully
    ok 9 - Root node has no parent
    ok 10 - Array has a non-zero length
    # [ true, { } ]
    ok 11 - Root node was obtained successfully
    ok 12 - Root node has no parent
    ok 13 - Array has a non-zero length
    # [ false, { "test" : 42 } ]
    ok 14 - Root node was obtained successfully
    ok 15 - Root node has no parent
    ok 16 - Array has a non-zero length
    # [ { "test" : 42 }, null ]
    ok 17 - Root node was obtained successfully
    ok 18 - Root node has no parent
    ok 19 - Array has a non-zero length
    # [ true, { "test" : 42 }, null ]
    ok 20 - Root node was obtained successfully
    ok 21 - Root node has no parent
    ok 22 - Array has a non-zero length
    # [ { "channel" : "/meta/connect" } ]
    ok 23 - Root node was obtained successfully
    ok 24 - Root node has no parent
    ok 25 - Array has a non-zero length
    1..25
ok 5 - Nested Array
    ok 1 - Parser created successfully
    ok 2 - Root node was obtained successfully
    ok 3 - Root node has no parent
    ok 4 - Root node is an OBJECT type
    ok 5 - Object retrieved from root is NOT Nil
    ok 6 - Object has no entries
    1..6
ok 6 - Empty Object
    ok 1 - Parser created successfully
    # { "test" : 42 }
    ok 2 - Root node was obtained successfully
    ok 3 - Root node has no parent
    ok 4 - Root node is an OBJECT type
    ok 5 - Object retrieved from root is NOT Nil
    ok 6 - Object contains the expected number of members
    ok 7 - Member 'test' retrieved successfully
    ok 8 - Node parent is the root node
    ok 9 - Node is the expected type (JSON_NODE_VALUE)
    ok 10 - Node's value is the expected type (40)
    # { "foo" : "bar", "baz" : null }
    ok 11 - Root node was obtained successfully
    ok 12 - Root node has no parent
    ok 13 - Root node is an OBJECT type
    ok 14 - Object retrieved from root is NOT Nil
    ok 15 - Object contains the expected number of members
    ok 16 - Member 'baz' retrieved successfully
    ok 17 - Node parent is the root node
    ok 18 - Node is the expected type (JSON_NODE_NULL)
    ok 19 - Node's value is the expected type (0)
    # { "name" : "", "state" : 1 }
    ok 20 - Root node was obtained successfully
    ok 21 - Root node has no parent
    ok 22 - Root node is an OBJECT type
    ok 23 - Object retrieved from root is NOT Nil
    ok 24 - Object contains the expected number of members
    ok 25 - Member 'name' retrieved successfully
    ok 26 - Node parent is the root node
    ok 27 - Node is the expected type (JSON_NODE_VALUE)
    ok 28 - Node's value is the expected type (64)
    # { "channel" : "/meta/connect" }
    ok 29 - Root node was obtained successfully
    ok 30 - Root node has no parent
    ok 31 - Root node is an OBJECT type
    ok 32 - Object retrieved from root is NOT Nil
    ok 33 - Object contains the expected number of members
    ok 34 - Member 'channel' retrieved successfully
    ok 35 - Node parent is the root node
    ok 36 - Node is the expected type (JSON_NODE_VALUE)
    ok 37 - Node's value is the expected type (64)
    # { "halign":0.5, "valign":0.5 }
    ok 38 - Root node was obtained successfully
    ok 39 - Root node has no parent
    ok 40 - Root node is an OBJECT type
    ok 41 - Object retrieved from root is NOT Nil
    ok 42 - Object contains the expected number of members
    ok 43 - Member 'valign' retrieved successfully
    ok 44 - Node parent is the root node
    ok 45 - Node is the expected type (JSON_NODE_VALUE)
    ok 46 - Node's value is the expected type (60)
    # { "" : "emptiness" }
    ok 47 - Root node was obtained successfully
    ok 48 - Root node has no parent
    ok 49 - Root node is an OBJECT type
    ok 50 - Object retrieved from root is NOT Nil
    ok 51 - Object contains the expected number of members
    ok 52 - Member '' retrieved successfully
    ok 53 - Node parent is the root node
    ok 54 - Node is the expected type (JSON_NODE_VALUE)
    ok 55 - Node's value is the expected type (64)
    1..55
ok 7 - Simple Object
    ok 1 - Parser created successfully
    # { "array" : [ false, "foo" ], "object" : { "foo" : true } }
    ok 2 - Root node was obtained successfully
    ok 3 - Root node has no parent
    ok 4 - Root node is an OBJECT type
    ok 5 - Object retrieved from root is NOT Nil
    ok 6 - Object is not empty
    # {
    #   "type" : "ClutterGroup",
    #   "width" : 1,
    #   "children" : [
    #     {
    #       "type" : "ClutterRectangle",
    #       "children" : [
    #         { "type" : "ClutterText", "text" : "hello there" }
    #       ]
    #     },
    #     {
    #       "type" : "ClutterGroup",
    #       "width" : 1,
    #       "children" : [
    #         { "type" : "ClutterText", "text" : "hello" }
    #       ]
    #     }
    #   ]
    # }
    ok 7 - Root node was obtained successfully
    ok 8 - Root node has no parent
    ok 9 - Root node is an OBJECT type
    ok 10 - Object retrieved from root is NOT Nil
    ok 11 - Object is not empty
    1..11
ok 8 - Nested Objects
    ok 1 - Parser created successfully
    # var foo = [ false, false, true ]
    ok 2 - Parser properly detects assignment
    ok 3 - Parser returns non-empty variable name of 'foo'
    ok 4 - Parser variable name matches expected result
    # var bar = [ true, 42 ];
    ok 5 - Parser properly detects assignment
    ok 6 - Parser returns non-empty variable name of 'bar'
    ok 7 - Parser variable name matches expected result
    # var baz = { "foo" : false }
    ok 8 - Parser properly detects assignment
    ok 9 - Parser returns non-empty variable name of 'baz'
    ok 10 - Parser variable name matches expected result
    1..10
ok 9 - Assignment
    ok 1 - Parser created successfully
    # { "test" : "foo è" }
    ok 2 - Root node was obtained successfully
    ok 3 - Root note is of OBJECT type
    ok 4 - Object retrieved from root node is NOT Nil
    ok 5 - Object contains at least 1 member
    ok 6 - Member 'test' is of VALUE type
    ok 7 - Member value matches expected result
==646085== Invalid read of size 1
==646085==    at 0x483EF46: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==646085==    by 0x4ABCA0C: make_wrapper.isra.0 (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4ABD256: at_pos (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x2C8FE41F: ???
==646085==    by 0x4A406A0: MVM_interp_run (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x1098F9: main (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/bin/rakudo-m)
==646085==  Address 0x1aade4b6 is 6 bytes inside a block of size 7 free'd
==646085==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==646085==    by 0x4A6F5F4: MVM_nativecall_invoke (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A4326A: MVM_interp_run (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x1098F9: main (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/bin/rakudo-m)
==646085==  Block was alloc'd at
==646085==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==646085==    by 0x4B042BB: MVM_string_utf8_encode_C_string (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A6C3AF: MVM_nativecall_unmarshal_string (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A6EF2B: MVM_nativecall_invoke (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A4326A: MVM_interp_run (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x1098F9: main (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/bin/rakudo-m)
==646085== 
    ok 8 - Retrieved value is a valid utf-8 string
    1..8
ok 10 - Unicode Escape
    ok 1 - Parser created successfully
--646085-- WARNING: unhandled amd64-linux syscall: 315
--646085-- You may be able to write your own handler.
--646085-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--646085-- Nevertheless we consider this a bug.  Please report
--646085-- it at http://valgrind.org/support/bug_reports.html.
    ok 2 - Successfully opened stream to /home/cbwood/Projects/p6-JSON-GLib/t/stream-load.json
    ok 3 - Root node was obtained successfully
    ok 4 - Root node is an ARRAY type
    ok 5 - Array holds only 1 element
    ok 6 - First element of the array is an OBJECT
==646085== Invalid free() / delete / delete[] / realloc()
==646085==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==646085==    by 0x4ABD040: gc_free (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A85610: MVM_gc_collect_free_nursery_uncopied (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A804FE: run_gc (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A812FE: MVM_gc_enter_from_allocator (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x4A81620: MVM_gc_allocate_nursery (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x2C519205: ???
==646085==    by 0x4A406A0: MVM_interp_run (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/lib/libmoar.so)
==646085==    by 0x1098F9: main (in /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/bin/rakudo-m)
==646085==  Address 0x27b89290 is 80 bytes inside a block of size 96 in arena "client"
==646085== 
No such method 'has-member' for invocant of type 'JSON::GLib::Node'
  in block <unit> at t/08-parser.t line 370

==646085== 
==646085== HEAP SUMMARY:
==646085==     in use at exit: 344,866,331 bytes in 769,111 blocks
==646085==   total heap usage: 4,611,559 allocs, 3,842,451 frees, 6,659,705,626 bytes allocated
==646085== 
==646085== LEAK SUMMARY:
==646085==    definitely lost: 687 bytes in 58 blocks
==646085==    indirectly lost: 734 bytes in 14 blocks
==646085==      possibly lost: 450,840 bytes in 8,011 blocks
==646085==    still reachable: 344,399,430 bytes in 760,908 blocks
==646085==                       of which reachable via heuristic:
==646085==                         length64           : 1,872 bytes in 36 blocks
==646085==                         newarray           : 1,984 bytes in 38 blocks
==646085==         suppressed: 0 bytes in 0 blocks
==646085== Rerun with --leak-check=full to see details of leaked memory
==646085== 
==646085== For lists of detected and suppressed errors, rerun with: -s
==646085== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment