cbbrowne/tpp

Crash with `exec`

jvoisin opened this issue · 0 comments

GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs
Copyright (C) 2014 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 a.out...(no debugging symbols found)...done.
gdb-peda$ b main
Breakpoint 1 at 0x804832f
gdb-peda$ r
Starting program: /home/jvoisin/prez/SudTelecom/a.out 
[----------------------------------registers-----------------------------------]
EAX: 0x1 (b'\x01')
EBX: 0xf7fb0000 --> 0x1a8da8 
ECX: 0xffffd130 ("\001")
EDX: 0xffffd154 --> 0xf7fb0000 --> 0x1a8da8 
ESI: 0x0 
EDI: 0x0 
EBP: 0xffffd118 ("")
ESP: 0xffffd110 ("\001")
EIP: 0x804832f (<main+15>:  cmp    DWORD PTR [ecx],0x3)
[-------------------------------------code-------------------------------------]
   0x804832b <main+11>: mov    ebp,esp
   0x804832d <main+13>: push   ecx
   0x804832e <main+14>: push   eax
=> 0x804832f <main+15>: cmp    DWORD PTR [ecx],0x3
   0x8048332 <main+18>: jne    0x8048344 <main+36>
   0x8048334 <main+20>: sub    esp,0xc
   0x8048337 <main+23>: push   0x80484d0
   0x804833c <main+28>: call   0x80482f0 <puts@plt>
[------------------------------------stack-------------------------------------]
0000| 0xffffd110 ("\001")
0004| 0xffffd114 --> 0xffffd130 ("\001")
0008| 0xffffd118 ("")
0012| 0xffffd11c --> 0xf7e20a83 (<__libc_start_main+243>:   mov    DWORD PTR [esp],eax)
0016| 0xffffd120 --> 0x8048440 (<__libc_csu_init>:  push   ebp)
0020| 0xffffd124 ("")
0024| 0xffffd128 ("")
0028| 0xffffd12c --> 0xf7e20a83 (<__libc_start_main+243>:   mov    DWORD PTR [esp],eax)
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value

Breakpoint 1, 0x0804832f in main ()
gdb-peda$ quit






                                               My slide title


 tpp@localhost:~ $ ^[/usr/bin/tpp:593:in `block in do_command_prompt': bad value for range (ArgumentError)
    from /usr/bin/tpp:566:in `loop'
    from /usr/bin/tpp:566:in `do_command_prompt'
    from /usr/bin/tpp:1429:in `block (2 levels) in do_run'
    from /usr/bin/tpp:1400:in `loop'
    from /usr/bin/tpp:1400:in `block in do_run'
    from /usr/bin/tpp:1385:in `loop'
    from /usr/bin/tpp:1385:in `do_run'
    from /usr/bin/tpp:1380:in `run'
    from /usr/bin/tpp:1770:in `<main>'
zsh: exit 1     tpp -x prez.tpp
jvoisin@kaa 13:27 ~/prez/SudTelecom tpp prez.tpp

I'm invoking --exec reset && gdb a.out within my tpp file.