Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created July 5, 2018 22:54
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 MasterDuke17/7fd92323c6661f52a75a824ffb7bc036 to your computer and use it in GitHub Desktop.
Save MasterDuke17/7fd92323c6661f52a75a824ffb7bc036 to your computer and use it in GitHub Desktop.
dan@hermes:~/p6/nqp$ gdb --args /home/dan/Source/perl6/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 --setting=NQPCORE --no-regex-lib --target=mbc --stable-sc=stage1 --output=gen/moar/stage1/QAST.moarvm gen/moar/stage1/QAST.nqp
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/dan/Source/perl6/install/bin/moar...done.
(gdb) r
Starting program: /home/dan/Source/perl6/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 --setting=NQPCORE --no-regex-lib --target=mbc --stable-sc=stage1 --output=gen/moar/stage1/QAST.moarvm gen/moar/stage1/QAST.nqp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff62fa700 (LWP 1239)]
Thread 1 "moar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7687172 in MVM_interp_run (tc=tc@entry=0x555555758c70, initial_invoke=0x555555f602a0, invoke_data=0x0) at src/core/interp.c:2304
2304 REPR(obj)->pos_funcs.shift(tc, STABLE(obj), obj,
(gdb) bt
#0 0x00007ffff7687172 in MVM_interp_run (tc=tc@entry=0x555555758c70, initial_invoke=0x555555f602a0, invoke_data=0x0) at src/core/interp.c:2304
#1 0x00007ffff7786cb5 in MVM_vm_run_file (instance=0x555555758260, filename=<optimized out>) at src/moar.c:412
#2 0x0000555555555612 in main (argc=12, argv=0x7fffffffdd88) at src/main.c:299
(gdb) quit
A debugging session is active.
Inferior 1 [process 1233] will be killed.
Quit anyway? (y or n) y
dan@hermes:~/p6/nqp$ valgrind /home/dan/Source/perl6/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 --setting=NQPCORE --no-regex-lib --target=mbc --stable-sc=stage1 --output=gen/moar/stage1/QAST.moarvm gen/moar/stage1/QAST.nqp
==1241== Memcheck, a memory error detector
==1241== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1241== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==1241== Command: /home/dan/Source/perl6/install/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/stage1 --setting=NQPCORE --no-regex-lib --target=mbc --stable-sc=stage1 --output=gen/moar/stage1/QAST.moarvm gen/moar/stage1/QAST.nqp
==1241==
==1241== Invalid read of size 8
==1241== at 0x500D172: MVM_interp_run (interp.c:2304)
==1241== by 0x510CCB4: MVM_vm_run_file (moar.c:412)
==1241== by 0x109611: main (main.c:299)
==1241== Address 0x10 is not stack'd, malloc'd or (recently) free'd
==1241==
==1241==
==1241== Process terminating with default action of signal 11 (SIGSEGV)
==1241== Access not within mapped region at address 0x10
==1241== at 0x500D172: MVM_interp_run (interp.c:2304)
==1241== by 0x510CCB4: MVM_vm_run_file (moar.c:412)
==1241== by 0x109611: main (main.c:299)
==1241== If you believe this happened as a result of a stack
==1241== overflow in your program's main thread (unlikely but
==1241== possible), you can try to increase the size of the
==1241== main thread stack using the --main-stacksize= flag.
==1241== The main thread stack size used in this run was 8388608.
==1241==
==1241== HEAP SUMMARY:
==1241== in use at exit: 40,998,670 bytes in 70,317 blocks
==1241== total heap usage: 405,155 allocs, 334,838 frees, 121,203,407 bytes allocated
==1241==
==1241== LEAK SUMMARY:
==1241== definitely lost: 13,706 bytes in 182 blocks
==1241== indirectly lost: 430,416 bytes in 56 blocks
==1241== possibly lost: 234,448 bytes in 4,185 blocks
==1241== still reachable: 40,320,100 bytes in 65,894 blocks
==1241== suppressed: 0 bytes in 0 blocks
==1241== Rerun with --leak-check=full to see details of leaked memory
==1241==
==1241== For counts of detected and suppressed errors, rerun with: -v
==1241== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment