Ticket #90 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Kite does not run on Snow Leopard

Reported by: mooneer Owned by: mooneer
Priority: critical Milestone:
Component: interpreter Version: 1.0.3
Keywords: Cc:

Description

Kite crashes on startup when using Snow Leopard:

harry:build mooneer$ bin/kite
Segmentation fault
harry:build mooneer$ gdb bin/kite
GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul  3 01:19:56 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done

(gdb) run
Starting program: /Users/mooneer/Desktop/build/bin/kite 
Reading symbols for shared libraries +. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010
0x00007fff8202ccc0 in strlen ()
(gdb) bt
#0  0x00007fff8202ccc0 in strlen ()
#1  0x00007fff820337b8 in strdup ()
#2  0x0000000100005188 in kite_set_docstring (obj=0x100115a50, doc=0x10 <Address 0x10 out of bounds>) at objs/kite_obj_manip.c:240
#3  0x0000000100017bd1 in kite_compile_instruction_constructor_body (compiler=0x100114630, line=38, func_args=0x1001147f0, doc_str=0x10 <Address 0x10 out of bounds>) at backend/kite-vm-1.0/kite_compile_bytecode.c:287
#4  0x0000000100008cd8 in yyparse (parm=0x100114690) at kite_parser.y:377
#5  0x0000000100006e7e in kite_vm_compile_from_fp (thd=0x100100120, fp=0x7fff703cbf18, f=0x1001144a0 "/Users/mooneer/Desktop/build/lib/kite/System/exceptions.kt", obj=0x100114530) at backend/common/kite_compiler.c:115
#6  0x0000000100006dc0 in kite_vm_compile_from_file_without_create (thd=0x100100120, file=0x1001144a0 "/Users/mooneer/Desktop/build/lib/kite/System/exceptions.kt", obj=0x100114530) at backend/common/kite_compiler.c:80
#7  0x000000010000434d in kite_load_dylib (thd=0x100100120, obj=0x100100d20, dylib=0x100114420 "System/exceptions", name=0x100114407 "exceptions") at objs/kite_obj_locate.c:213
#8  0x00000001000046c8 in kite_dereference_and_load (thd=0x100100120, class=0x100100fd0 "System.exceptions") at objs/kite_obj_locate.c:278
#9  0x00000001000085be in yyparse (parm=0x100100e50) at kite_parser.y:217
#10 0x0000000100006e7e in kite_vm_compile_from_fp (thd=0x100100120, fp=0x7fff703cbe80, f=0x100100b40 "/Users/mooneer/Desktop/build/lib/kite/System.kt", obj=0x100100d20) at backend/common/kite_compiler.c:115
#11 0x0000000100006dc0 in kite_vm_compile_from_file_without_create (thd=0x100100120, file=0x100100b40 "/Users/mooneer/Desktop/build/lib/kite/System.kt", obj=0x100100d20) at backend/common/kite_compiler.c:80
#12 0x000000010000434d in kite_load_dylib (thd=0x100100120, obj=0x100100170, dylib=0x100100ad0 "System", name=0x100100ac0 "System") at objs/kite_obj_locate.c:213
#13 0x00000001000046c8 in kite_dereference_and_load (thd=0x100100120, class=0x10003ce09 "System.boolean") at objs/kite_obj_locate.c:278
#14 0x0000000100002cb7 in kite_new_boolean (thd=0x100100120, val=1) at objs/kite_obj_create.c:205
#15 0x00000001000071b8 in kite_new_vm (args=0x7fff5fbff9f8) at backend/common/kite_vm.c:115
#16 0x000000010000175d in main (argc=0, argv=0x7fff5fbff9f8) at apps/kite.c:129
(gdb)

Change History

comment:1 Changed 2 years ago by mooneer

  • Version changed from 1.0.2 to 1.0.3

comment:2 Changed 2 years ago by mooneer

  • Status changed from new to assigned

comment:3 Changed 2 years ago by mooneer

Compiling with --with-gc=no (and -m32) works properly. Omitting -m32 results in a crash, so it's probably not a GC library issue. Investigating.

comment:4 Changed 2 years ago by mooneer

Confirmed that Boehm GC is not involved (compiled and ran a 32-bit Kite without issues).

comment:5 Changed 2 years ago by mooneer

  • Status changed from assigned to closed
  • Resolution set to fixed

Found problem--kite_compile_instruction_constructor_body() received too few arguments from the parser, causing the issue. (fixed in r596). Closing ticket.

Note: See TracTickets for help on using tickets.