[DGD] segmentation fault during compile_object

bart at wotf.org bart at wotf.org
Mon Aug 12 20:48:41 CEST 2013


Well, maybe I should go back in hiding...  I really wasn't planning on bug
hunting, but here is another one (sorry no patch this time) :-)

On a default compile of 1.5 (latest updates from git), trying to compile an
object that contains a line like:

f = &create();

causes the compiler to emit a syntax error (correct as CLOSURES is not
enabled) and then crashes the driver.

Below is a backtrace, maybe its helpful for someone more familiar with the
compiler.

#0  c_nil (n=0x0) at compile.c:1100                                          
1100        if (n->type == N_COMMA) {                                        
(gdb) bt                                                                     
#0  c_nil (n=0x0) at compile.c:1100                                          
#1  0x0806df08 in yyparse () at parser.y:1941                                
#2  0x0807c29d in c_compile (f=0xbfbfb6fc, file=0xbfbfb37c
"wiz/aidil/obj/eval_ob", obj=0x0, 
    strs=0xbfbfb354, nstr=1, iflag=0) at compile.c:649                       
               
#3  0x08095cb4 in kf_compile_object (f=0xbfbfb6fc, nargs=1) at std.c:123     
               
#4  0x08065804 in i_interpret1 (f=0xbfbfb6fc, pc=0x2870cb18 "1�\031") at
interpret.c:2592    
#5  0x08063f5c in i_funcall (prev_f=0xbfbfba2c, obj=Variable "obj" is not
available.
) at interpret.c:2973
#6  0x08064481 in i_call (f=0xbfbfba2c, obj=0x28400008, lwobj=0x0,
func=0x2870539e "compile_object", len=14,
    call_static=0, nargs=2) at interpret.c:3106
#7  0x0809587e in kf_call_other (f=0xbfbfba2c, nargs=4) at std.c:189
#8  0x08065804 in i_interpret1 (f=0xbfbfba2c,
    pc=0x2870e9d7 "\n\004?\206\002\004+%\001\032\224\003\n\004?� \001") at
interpret.c:2592
#9  0x08063f5c in i_funcall (prev_f=0xbfbfbcbc, obj=Variable "obj" is not
available.
) at interpret.c:2973
#10 0x08065b99 in i_interpret1 (f=0xbfbfbcbc, pc=0x2871b6d1 "?���*\001\001")
at interpret.c:2680
#11 0x08063f5c in i_funcall (prev_f=0xbfbfc03c, obj=Variable "obj" is not
available.
) at interpret.c:2973
#12 0x08065c59 in i_interpret1 (f=0xbfbfc03c, pc=0x287712bb
"\n\0041���\004\t\033C") at interpret.c:2698
#13 0x08065cac in i_interpret1 (f=Variable "f" is not available.
) at interpret.c:2708
#14 0x08063f5c in i_funcall (prev_f=0xbfbfc3fc, obj=Variable "obj" is not
available.
) at interpret.c:2973
#15 0x08064481 in i_call (f=0xbfbfc3fc, obj=0x28400e90, lwobj=0x0,
func=0x287617a6 "main", len=4,
    call_static=0, nargs=1) at interpret.c:3106
#16 0x0809587e in kf_call_other (f=0xbfbfc3fc, nargs=3) at std.c:189
#17 0x08065804 in i_interpret1 (f=0xbfbfc3fc,
    pc=0x2876aa61
"@\0011�\031\001���\032\0031�%�\006\023\032�\032\0238\001p��8\001�d\004.\004\231%�")
    at interpret.c:2592
#18 0x08063f5c in i_funcall (prev_f=0xbfbfc7ac, obj=Variable "obj" is not
available.
) at interpret.c:2973
#19 0x08064481 in i_call (f=0xbfbfc7ac, obj=0x28400d78, lwobj=0x0,
func=0x28733f7e "receive_message",
    len=15, call_static=0, nargs=1) at interpret.c:3106
#20 0x0809587e in kf_call_other (f=0xbfbfc7ac, nargs=3) at std.c:189
#21 0x08065804 in i_interpret1 (f=0xbfbfc7ac, pc=0x28766bc0 "?\232:?@�� \001")
at interpret.c:2592
#22 0x08065d83 in i_interpret1 (f=Variable "f" is not available.
) at interpret.c:2736
#23 0x08063f5c in i_funcall (prev_f=0xbfbfca3c, obj=Variable "obj" is not
available.
) at interpret.c:2973
#24 0x08065c59 in i_interpret1 (f=0xbfbfca3c, pc=0x28766be3 "Z:?@�") at
interpret.c:2698
#25 0x08063f5c in i_funcall (prev_f=0x80b8d80, obj=Variable "obj" is not
available.
) at interpret.c:2973
#26 0x08064481 in i_call (f=0x80b8d80, obj=0x28400aa8, lwobj=0x0,
func=0x80a7648 "receive_message", len=15,
    call_static=1, nargs=1) at interpret.c:3106
#27 0x0805d61c in comm_receive (f=0x80b8d80, timeout=1, mtime=980) at comm.c:1578
#28 0x0806a383 in dgd_main (argc=Variable "argc" is not available.
) at dgd.c:223
#29 0x0809bb7e in main (argc=Cannot access memory at address 0x1
) at local.c:46


--
http://www.flickr.com/photos/mrobjective/
http://www.om-d.org/




More information about the DGD mailing list