#1273: Provide a parrot 'backtrace' with assertion failures.
-----------------------------+----------------------------------------------
Reporter: Austin_Hastings | Owner:
Type: todo | Status: new
Priority: normal | Milestone:
Component: none | Version: 1.7.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
-----------------------------+----------------------------------------------
Comment(by cotto):
My thinking is to provide a best effort attempt to get a pir-level
backtrace, i.e. we'll try to provide a backtrace, but if it breaks you
don't get to complain. It's true that we can't assume that the interp is
in a usable state (or even that it exists), but if it does it'll be
helpful to provide as much information as possible.
I added this functionality to Parrot_print_backtrace in the pir-bt-on-
crash branch in parrot.git. Below is what the output looks like when I
purposefully trigger a crash in oofib.pir. I'd appreciate another pair of
eyeballs looking over the code.
{{{
cotto@cotto-linux-desktop:/usr/src/parrot-git-master @pir-bt-on-crash 3 $
./parrot crashfib.pir
src/ops/core_ops.c:23476: failed assertion '0'
Backtrace - Obtained 12 stack frames (max trace depth is 32).
/usr/src/parrot-git-master/blib/lib/libparrot.so.3.0.0(+0xc3c0a)
[0xcf3c0a]
/usr/src/parrot-git-
master/blib/lib/libparrot.so.3.0.0(Parrot_confess+0x9a) [0xcf3bca]
/usr/src/parrot-git-master/blib/lib/libparrot.so.3.0.0(+0xa3b11)
[0xcd3b11]
/usr/src/parrot-git-master/blib/lib/libparrot.so.3.0.0(+0x116c81)
[0xd46c81]
/usr/src/parrot-git-master/blib/lib/libparrot.so.3.0.0(+0x115cea)
[0xd45cea]
/usr/src/parrot-git-master/blib/lib/libparrot.so.3.0.0(+0xe370f)
[0xd1370f]
/usr/src/parrot-git-
master/blib/lib/libparrot.so.3.0.0(Parrot_pcc_invoke_from_sig_object+0x19b)
[0xd0dadb]
/usr/src/parrot-git-
master/blib/lib/libparrot.so.3.0.0(Parrot_pcc_invoke_sub_from_c_args+0x11e)
[0xd0d3be]
/usr/src/parrot-git-
master/blib/lib/libparrot.so.3.0.0(Parrot_api_run_bytecode+0x236)
[0xced6f6]
./parrot() [0x8049272]
/lib/libc.so.6(__libc_start_main+0xe7) [0x7d2ce7]
./parrot() [0x8048f31]
Attempting to get PIR backtrace. No guarantees. Here goes...
current instr.: 'parrot;B;fibB' pc 200 (crashfib.pir:103)
called from Sub 'parrot;A;fib' pc 103 (crashfib.pir:60)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'parrot;A;fibA' pc 138 (crashfib.pir:76)
called from Sub 'parrot;A;fib' pc 91 (crashfib.pir:56)
called from Sub 'bench' pc 44 (crashfib.pir:30)
Aborted
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1273#comment:5>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets