Recompiled with gcc-9 -O2 -g with RTL_DEBUG with valgrind support.

This time with:
  --with-double-precision --with-long-int \
  --disable-noopty-retry \
  --with-poll \
  --without-machine-code \
  --with-portable-bytecode \

The program now delivers the right output, but the valgrind report(s)
are not completely spotless, so it seems:
$ ./vspike  -h
==10728== Memcheck, a memory error detector
==10728== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10728== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10728== Command: /usr/local/bin/pike ./vspike -h
==10728== 
==10728== Conditional jump or move depends on uninitialised value(s)
==10728==    at 0x375731: _asm_peep_11 (peep_engine.c:759)
==10728==    by 0x37AF6D: low_asm_opt (peep_engine.c:5837)
==10728==    by 0x37E73C: asm_opt (peep.c:1159)
==10728==    by 0x37E73C: assemble (peep.c:441)
==10728==    by 0x1B6EBE: decode_portable_bytecode (encode.c:3048)
==10728==    by 0x1B6EBE: decode_value2_ (encode.c:4368)
==10728==    by 0x1BB7B2: low_do_decode (encode.c:4996)
==10728==    by 0x1C670A: my_decode (encode.c:5124)
==10728==    by 0x1C670A: f_decode_value (encode.c:5511)
==10728==    by 0x24C8D1: get_master (object.c:668)
==10728==    by 0x231256: load_pike_master (pike_embed.c:370)
==10728==    by 0x126253: main (main.c:666)
==10728== 
Usage: spike [-dvb] [-a authtoken] [-r pidfile]
             [-p [host:]port] sitesfile ...
        -a                      Set authtoken (also environment AUTHTOKEN)
        -c                      Specify alternate to config.pmod
        -d                      Increase debuglevel (forces foreground)
        -h                      Help about usage.
        -k                      Kill running daemon
        -l                      Syslog facility number
        -n                      Name this daemon
        -b                      Inhibit spawning bots
        -r                      Specify alternate PID file path
        -p                      Default TCP listenport
        -v                      Verbose
==10728== Invalid read of size 2
==10728==    at 0x1E2582: debug_gc_free_extra_ref (gc.c:2125)
==10728==    by 0x1E3D74: do_gc.part.0 (gc.c:3840)
==10728==    by 0x380BEF: exit_modules (pike_modules.c:494)
==10728==    by 0x230D1D: pike_do_exit (pike_embed.c:438)
==10728==    by 0x125C4B: main (main.c:682)
==10728==  Address 0x6e03bb4 is 29,636 bytes inside a recently re-allocated 
block of size 81,936 alloc'd
==10728==    at 0x483677F: malloc (vg_replace_malloc.c:307)
==10728==    by 0x240DAD: debug_xalloc (pike_memory.c:306)
==10728==    by 0x240054: ba_alloc_page (block_allocator.c:103)
==10728==    by 0x240054: ba_low_alloc (block_allocator.c:248)
==10728==    by 0x240054: ba_alloc (block_allocator.c:259)
==10728==    by 0x246EDF: alloc_object (object.c:101)
==10728==    by 0x246EDF: low_clone (object.c:135)
==10728==    by 0x247CEB: parent_clone_object (object.c:454)
==10728==    by 0x13CBE8: low_mega_apply (apply_low.h:238)
==10728==    by 0x141F7E: eval_instruction_without_debug 
(interpret_functions.h:2422)
==10728==    by 0x17D4D4: eval_instruction (interpret.c:2012)
==10728==    by 0x17D4D4: mega_apply_low (interpret.c:3050)
==10728==    by 0x247579: call_pike_initializers (object.c:343)
==10728==    by 0x27B970: run_cleanup (pike_compiler.cmod:1354)
==10728==    by 0x27D9BA: f_compilation_compile (pike_compiler.cmod:1770)
==10728==    by 0x13D9B1: lower_mega_apply (interpret.c:2506)
==10728== 
==10728== Invalid read of size 4
==10728==    at 0x1E2738: debug_gc_free_extra_ref (gc.c:2137)
==10728==    by 0x1E3D74: do_gc.part.0 (gc.c:3840)
==10728==    by 0x380BEF: exit_modules (pike_modules.c:494)
==10728==    by 0x230D1D: pike_do_exit (pike_embed.c:438)
==10728==    by 0x125C4B: main (main.c:682)
==10728==  Address 0x6e03bc0 is 29,648 bytes inside a recently re-allocated 
block of size 81,936 alloc'd
==10728==    at 0x483677F: malloc (vg_replace_malloc.c:307)
==10728==    by 0x240DAD: debug_xalloc (pike_memory.c:306)
==10728==    by 0x240054: ba_alloc_page (block_allocator.c:103)
==10728==    by 0x240054: ba_low_alloc (block_allocator.c:248)
==10728==    by 0x240054: ba_alloc (block_allocator.c:259)
==10728==    by 0x246EDF: alloc_object (object.c:101)
==10728==    by 0x246EDF: low_clone (object.c:135)
==10728==    by 0x247CEB: parent_clone_object (object.c:454)
==10728==    by 0x13CBE8: low_mega_apply (apply_low.h:238)
==10728==    by 0x141F7E: eval_instruction_without_debug 
(interpret_functions.h:2422)
==10728==    by 0x17D4D4: eval_instruction (interpret.c:2012)
==10728==    by 0x17D4D4: mega_apply_low (interpret.c:3050)
==10728==    by 0x247579: call_pike_initializers (object.c:343)
==10728==    by 0x27B970: run_cleanup (pike_compiler.cmod:1354)
==10728==    by 0x27D9BA: f_compilation_compile (pike_compiler.cmod:1770)
==10728==    by 0x13D9B1: lower_mega_apply (interpret.c:2506)
==10728== 
==10728== Invalid write of size 4
==10728==    at 0x1E265F: debug_gc_free_extra_ref (gc.c:2144)
==10728==    by 0x1E3D74: do_gc.part.0 (gc.c:3840)
==10728==    by 0x380BEF: exit_modules (pike_modules.c:494)
==10728==    by 0x230D1D: pike_do_exit (pike_embed.c:438)
==10728==    by 0x125C4B: main (main.c:682)
==10728==  Address 0x6e03bc0 is 29,648 bytes inside a recently re-allocated 
block of size 81,936 alloc'd
==10728==    at 0x483677F: malloc (vg_replace_malloc.c:307)
==10728==    by 0x240DAD: debug_xalloc (pike_memory.c:306)
==10728==    by 0x240054: ba_alloc_page (block_allocator.c:103)
==10728==    by 0x240054: ba_low_alloc (block_allocator.c:248)
==10728==    by 0x240054: ba_alloc (block_allocator.c:259)
==10728==    by 0x246EDF: alloc_object (object.c:101)
==10728==    by 0x246EDF: low_clone (object.c:135)
==10728==    by 0x247CEB: parent_clone_object (object.c:454)
==10728==    by 0x13CBE8: low_mega_apply (apply_low.h:238)
==10728==    by 0x141F7E: eval_instruction_without_debug 
(interpret_functions.h:2422)
==10728==    by 0x17D4D4: eval_instruction (interpret.c:2012)
==10728==    by 0x17D4D4: mega_apply_low (interpret.c:3050)
==10728==    by 0x247579: call_pike_initializers (object.c:343)
==10728==    by 0x27B970: run_cleanup (pike_compiler.cmod:1354)
==10728==    by 0x27D9BA: f_compilation_compile (pike_compiler.cmod:1770)
==10728==    by 0x13D9B1: lower_mega_apply (interpret.c:2506)
==10728== 
Leak(s) found at exit:
Array at 0x56efca0 got 1 unaccounted refs (and 0 accounted): ({ /* 2 elements */
    12,
    2147487744
})
Program at 0x4e7fdd0 got 1 unaccounted refs (and 7 accounted): 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)
Object at 0x6e018f0 got 1 unaccounted refs (and 2 accounted): 
object(/usr/local/pike/8.1.13/lib/modules/Standards.pmod/X509.pmod)
Object at 0x4c970a0 got 1 unaccounted refs (and 10 accounted): 0 (destructed)
  Program for destructed object: program(/usr/local/pike/8.1.13/lib/master.pike)
Type at 0x4f6ff48 got 1 unaccounted refs (and 1 accounted): function({ Buffer = 
object(implements 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)) }, int(..) : 
string(0..: 8bit))
Type at 0x4f70188 got 1 unaccounted refs (and 1 accounted): function({ Buffer = 
object(implements 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)) } : { Buffer = 
object(implements 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)) })
Type at 0x4f684f0 got 1 unaccounted refs (and 1 accounted): { TBSCertificate = 
object(implements program(var/src/roxen/81pike/src/pike_compiler.cmod:3232)) }
Type at 0x4c8c310 got 1 unaccounted refs (and 931 accounted): int(..)
Type at 0x4f6ffd8 got 2 unaccounted refs (and 2 accounted): function({ Buffer = 
object(implements 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)) } : void)
Type at 0x4c8c748 got 1 unaccounted refs (and 280 accounted): function
Type at 0x4e38d48 got 1 unaccounted refs (and 16 accounted): 
function(string(0..: 8bit) : void)
Type at 0x4c8cce8 got 1 unaccounted refs (and 191 accounted): string(0..: 8bit)
Type at 0x4f54d98 got 1 unaccounted refs (and 3 accounted): function(void | 
string(0..: 8bit) : void)
Type at 0x4f67ba8 got 1 unaccounted refs (and 0 accounted): array(0..: { 
TBSCertificate = object(implements 
program(var/src/roxen/81pike/src/pike_compiler.cmod:3232)) })
Type at 0x4c8c430 got 1 unaccounted refs (and 721 accounted): string(0..: ..)
Type at 0x4d8c040 got 1 unaccounted refs (and 30 accounted): array(0..: int(..))
Type at 0x4f4dbb0 got 1 unaccounted refs (and 20 accounted): { Buffer = 
object(implements 
program(var/src/roxen/81pike/src/modules/_Stdio/buffer.cmod:77)) }
==10728== LEAK SUMMARY:
==10728==    definitely lost: 0 bytes in 0 blocks
==10728==    indirectly lost: 0 bytes in 0 blocks
==10728==      possibly lost: 0 bytes in 0 blocks
==10728==    still reachable: 8,182,771 bytes in 50,260 blocks
==10728==         suppressed: 0 bytes in 0 blocks
==10728== Reachable blocks (those to which a pointer was found) are not shown.
==10728== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==10728== 
Free of leaked array 0x56efca0 from /home/srb/pike/src/pike_modules.c:311, 0 
refs remaining
Free of leaked program 0x4e7fdd0 from /home/srb/pike/src/pike_modules.c:314, 7 
refs remaining
Free of leaked object 0x6e018f0 from /home/srb/pike/src/pike_modules.c:315, 2 
refs remaining
Free of leaked object 0x4c970a0 from /home/srb/pike/src/pike_modules.c:315, 10 
refs remaining
Free of leaked type 0x4f6ff48 from /home/srb/pike/src/pike_modules.c:320, 1 
refs remaining
Free of leaked type 0x4f70188 from /home/srb/pike/src/pike_modules.c:320, 1 
refs remaining
Free of leaked type 0x4f684f0 from /home/srb/pike/src/pike_modules.c:320, 1 
refs remaining
Free of leaked type 0x4c8c310 from /home/srb/pike/src/pike_modules.c:320, 931 
refs remaining
Free of leaked type 0x4f6ffd8 from /home/srb/pike/src/pike_modules.c:320, 3 
refs remaining
Free of leaked type 0x4f6ffd8 from /home/srb/pike/src/pike_modules.c:320, 2 
refs remaining
Free of leaked type 0x4c8c748 from /home/srb/pike/src/pike_modules.c:320, 280 
refs remaining
Free of leaked type 0x4e38d48 from /home/srb/pike/src/pike_modules.c:320, 16 
refs remaining
Free of leaked type 0x4c8cce8 from /home/srb/pike/src/pike_modules.c:320, 191 
refs remaining
Free of leaked type 0x4f54d98 from /home/srb/pike/src/pike_modules.c:320, 3 
refs remaining
Free of leaked type 0x4f67ba8 from /home/srb/pike/src/pike_modules.c:320, 0 
refs remaining
Free of leaked type 0x4f684f0 from /home/srb/pike/src/pike_types.cmod:343, 0 
refs remaining
Free of leaked type 0x4c8c430 from /home/srb/pike/src/pike_modules.c:320, 721 
refs remaining
Free of leaked type 0x4d8c040 from /home/srb/pike/src/pike_modules.c:320, 30 
refs remaining
Free of leaked type 0x4f4dbb0 from /home/srb/pike/src/pike_modules.c:320, 20 
refs remaining
Strings left: 11 (263584 bytes) (zapped)
0x0x4eeb6a8: 1 refs, len=10, size_shift=0, hval=13992549041791010103x 
(c22f8537c22f8537)
 "has_prefix"
0x0x4ee9ba8: 1 refs, len=9, size_shift=0, hval=1381628766843602955x 
(132c880b132c880b)
 "aggregate"
0x0x4c49580: 1 refs, len=6, size_shift=0, hval=15951777156902688974x 
(dd6018cedd6018ce)
 "__INIT"
0x0x627f088: 1 refs, len=11, size_shift=0, hval=4977915312525876122x 
(45151b9a45151b9a)
 "read_string"
0x0x6b61498: 1 refs, len=5, size_shift=0, hval=17045325102583720158x 
(ec8d28deec8d28de)
 "certs"
0x0x4ef33d0: 1 refs, len=12, size_shift=0, hval=7267058527353030458x 
(64d9c73a64d9c73a)
 "read_hbuffer"
0x0x4ee9e78: 1 refs, len=8, size_shift=0, hval=10441818879220566770x 
(90e8caf290e8caf2)
 "allocate"
0x0x627f310: 1 refs, len=10, size_shift=0, hval=5269898974766199090x 
(4922713249227132)
 "parse_item"
0x0x627f3e8: 1 refs, len=12, size_shift=0, hval=561954521866860201x 
(7cc76a907cc76a9)
 "add_keychain"
0x0x627f0d0: 1 refs, len=10, size_shift=0, hval=17917283900022258374x 
(f8a6fac6f8a6fac6)
 "parse_cert"
0x0x4c495c8: 1 refs, len=6, size_shift=0, hval=17990890727435697099x 
(f9ac7bcbf9ac7bcb)
 "create"
==10728== 
==10728== HEAP SUMMARY:
==10728==     in use at exit: 0 bytes in 0 blocks
==10728==   total heap usage: 2,458,329 allocs, 246,784 frees, 540,176,277 
bytes allocated
==10728== 
==10728== All heap blocks were freed -- no leaks are possible
==10728== 
==10728== Use --track-origins=yes to see where uninitialised values come from
==10728== For lists of detected and suppressed errors, rerun with: -s
==10728== ERROR SUMMARY: 14 errors from 4 contexts (suppressed: 0 from 0)

-- 
Stephen.
  • Segmentation fault... Stephen R. van den Berg
    • Re: Segmentat... Stephen R. van den Berg
      • Re: Segme... Henrik Grubbström (Lysator) @ Pike (-) developers forum
        • Re: S... Stephen R. van den Berg
          • R... Stephen R. van den Berg
            • ... Stephen R. van den Berg
              • ... Stephen R. van den Berg
                • ... Stephen R. van den Berg
                • ... Henrik Grubbström (Lysator) @ Pike (-) developers forum
                • ... Stephen R. van den Berg
                • ... Tobias S. Josefowitz @ Pike developers forum
                • ... Stephen R. van den Berg
                • ... Tobias S. Josefowitz @ Pike developers forum
                • ... Stephen R. van den Berg
                • ... Stephen R. van den Berg
                • ... Tobias S. Josefowitz @ Pike developers forum

Reply via email to