fb39ca4 / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

Picoc -i on OSX gives SIGABRT #199

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. picoc -i
2. int x; 
3. failure

What is the expected output? What do you see instead?
Expected output should be a next line of the interpreter, instead, program 
exists. 

What version of the product are you using? On what operating system?
picoc v2.1

uname -a
13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; 
root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

Please provide any additional information below.

GDB:

bin❯ lldb picoc                                                               

                local/git/master
(lldb) target create "picoc"
Current executable set to 'picoc' (x86_64).
(lldb) b 0x7fff8f3a4866
Breakpoint 1: address = 0x00007fff8f3a4866
(lldb) run -i
Process 92046 launched: '/usr/local/bin/picoc' (x86_64)
starting picoc v2.1
picoc> int x;
Process 92046 stopped
* thread #1: tid = 0x370978, 0x00007fff8f3a4866 
libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', 
stop reason = signal SIGABRT
    frame #0: 0x00007fff8f3a4866 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill + 10:
-> 0x7fff8f3a4866:  jae    0x7fff8f3a4870            ; __pthread_kill + 20
   0x7fff8f3a4868:  movq   %rax, %rdi
   0x7fff8f3a486b:  jmp    0x7fff8f3a1175            ; cerror_nocancel
   0x7fff8f3a4870:  retq
(lldb) bt
* thread #1: tid = 0x370978, 0x00007fff8f3a4866 
libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', 
stop reason = signal SIGABRT
  * frame #0: 0x00007fff8f3a4866 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff90f5035c libsystem_pthread.dylib`pthread_kill + 92
    frame #2: 0x00007fff8840bbba libsystem_c.dylib`__abort + 145
    frame #3: 0x00007fff8840c46d libsystem_c.dylib`__stack_chk_fail + 196
    frame #4: 0x000000010000303f picoc`LexGetRawToken + 935
    frame #5: 0x0000000100003329 picoc`LexGetToken + 42
    frame #6: 0x00000001000037cd picoc`ParseStatement + 81
    frame #7: 0x000000010000509d picoc`PicocParseInteractive + 97
    frame #8: 0x0000000100001602 picoc`main + 290
    frame #9: 0x00007fff894f45fd libdyld.dylib`start + 1
    frame #10: 0x00007fff894f45fd libdyld.dylib`start + 1
(lldb) register read
General Purpose Registers:
       rax = 0x0000000000000000
       rbx = 0x00007fff7959a310  libsystem_pthread.dylib`_thread
       rcx = 0x00007fff5fbff3d8
       rdx = 0x0000000000000000
       rdi = 0x0000000000000d0b
       rsi = 0x0000000000000006
       rbp = 0x00007fff5fbff400
       rsp = 0x00007fff5fbff3d8
        r8 = 0x0000000000000000
        r9 = 0x0000000000000000
       r10 = 0x0000000008000000
       r11 = 0x0000000000000206
       r12 = 0x00007fff5fbff510
       r13 = 0x0000000000000036
       r14 = 0x0000000000000006
       r15 = 0x0000000100013e00  picoc`StrEmpty
       rip = 0x00007fff8f3a4866  libsystem_kernel.dylib`__pthread_kill + 10
    rflags = 0x0000000000000206
        cs = 0x0000000000000007
        fs = 0x0000000000000000
        gs = 0x00000000000a0000

(lldb)

Original issue reported on code.google.com by Mezger.B...@gmail.com on 12 Nov 2014 at 12:52