Bus Error (from object.c) when trying to do an Oracle query
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2049
Reported by Leif Stensson leif@roxen.com
Trying to use Oracle in Pike 7.3 results in a Bus Error. It's possible to connect, but when doing a query, Pike crashes. At least on sol8-sparc.
Perhaps this should be categorized as a database support problem since it's triggered by trying to use the Oracle support, but the innermost levels of the backtrace are from the Pike core (actually, all of the backtrace is from the core, except for one function which gdb couldn't figure out where it came from; generated machine code?), and oracle.c hasn't changed from Pike 7.2 where it works fine, so the problem is likely to be cause by core changes.
The backtrace:
#0 0x9ec50 in low_clone (p=0x33cdb4) at
/home/leif/Pike/7.3/src/object.c:129
#1 0x9f270 in parent_clone_object (p=0x33cdb4, parent=0x334eb0,
parent_identifier=0, args=1) at /home/leif/Pike/7.3/src/object.c:322
#2 0x39b74 in low_mega_apply (type=APPLY_SVALUE, args=1, arg1=0x334eb0,
arg2=0x33cdb4) at /home/leif/Pike/7.3/src/interpret.c:1381
#3 0x377d8 in opcode_F_CALL_FUNCTION ()
at /home/leif/Pike/7.3/src/interpret_functions.h:1800
#4 0x3ad37c in ?? ()
#5 0x2f6d4 in eval_instruction (pc=0x30b7b0)
at /home/leif/Pike/7.3/src/interpret.c:863
#6 0x3a7b0 in mega_apply (type=APPLY_LOW, args=1, arg1=0x3ce568, arg2=0x8)
at /home/leif/Pike/7.3/src/interpret.c:1665
#7 0x3b3d8 in apply_lfun (o=0x3ce568, fun=1, args=1)
at /home/leif/Pike/7.3/src/interpret.c:1940
#8 0x9f084 in call_pike_initializers (o=0x3ce568, args=1)
at /home/leif/Pike/7.3/src/object.c:271
#9 0x9f310 in parent_clone_object (p=0x33c8a4, parent=0x334eb0,
parent_identifier=4, args=1) at /home/leif/Pike/7.3/src/object.c:335
#10 0x39b74 in low_mega_apply (type=APPLY_LOW, args=1, arg1=0x334eb0,
arg2=0x3ce568) at /home/leif/Pike/7.3/src/interpret.c:1381
#11 0x37a74 in opcode_F_CALL_OTHER (arg1=32)
at /home/leif/Pike/7.3/src/interpret_functions.h:1818
#12 0x3b9a54 in ?? ()
#13 0x3a8a4 in o_catch (pc=0x324a48)
at /home/leif/Pike/7.3/src/interpret.c:1703
#14 0x343ec in opcode_F_CATCH ()
at /home/leif/Pike/7.3/src/interpret_functions.h:1115
#15 0x324a48 in ?? ()
#16 0x2f6d4 in eval_instruction (pc=0x337440)
at /home/leif/Pike/7.3/src/interpret.c:863
#17 0x3a7b0 in mega_apply (type=APPLY_LOW, args=0, arg1=0x2803f8,
arg2=0x25)
at /home/leif/Pike/7.3/src/interpret.c:1665
#18 0x3b3d8 in apply_lfun (o=0x2803f8, fun=0, args=0)
at /home/leif/Pike/7.3/src/interpret.c:1940
#19 0x9f084 in call_pike_initializers (o=0x2803f8, args=0)
at /home/leif/Pike/7.3/src/object.c:271
#20 0x9f310 in parent_clone_object (p=0x2caa3c, parent=0x2801d8,
parent_identifier=1, args=0) at /home/leif/Pike/7.3/src/object.c:335
#21 0x39b74 in low_mega_apply (type=APPLY_LOW, args=0, arg1=0x2801d8,
arg2=0x2803f8) at /home/leif/Pike/7.3/src/interpret.c:1381
#22 0x37cb0 in opcode_F_CALL_OTHER_AND_POP (arg1=125)
at /home/leif/Pike/7.3/src/interpret_functions.h:1871
#23 0x312bac in ?? ()
#24 0x2f6d4 in eval_instruction (pc=0x30f7a0)
at /home/leif/Pike/7.3/src/interpret.c:863
#25 0x3a7b0 in mega_apply (type=APPLY_LOW, args=2, arg1=0x2802f8,
arg2=0x4c)
at /home/leif/Pike/7.3/src/interpret.c:1665
#26 0x3b444 in apply (o=0x2802f8, fun=0x17af10 "_main", args=2)
at /home/leif/Pike/7.3/src/interpret.c:1952
#27 0x97a34 in main (argc=1, argv=0xffbefc0c)
at /home/leif/Pike/7.3/src/main.c:702
Line 129 in object.c is
LOW_PARENT_INFO(o,p)->parent=0;
Some variables and stuff:
(gdb) print o $1 = (struct object *) 0x335110 (gdb) print p $2 = (struct program *) 0x33cdb4 (gdb) print o->storage $3 = 0x2f63a8 "" (gdb) print p->parent_info_storage $4 = -1
Since LOW_PARENT_INFO essentially computes an address of o->storage plus p->parent_info_storage, it's not surprising that it bombs when trying to assign a pointer member at an unaligned address.