Image.AVS.decode dumps core in testsuite
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1561
Reported by Mirar , Idonex Heavy Industries mirar@roxen.com
chapter: encoding/decoding test: Image.PNM.encode/decode...ok test: Image.GIF.encode/decode...ok test: Image.GIF.encode/decode colortable ...ok test: Image.GIF.encode/decode colortable w/ floyd-steinberg...ok test: Image.AVS.encode/decode ...
Program received signal SIGSEGV, Segmentation fault.
0x40416bd5 in image_avs_f__decode (args=1)
at /home/mirar/pike/src/modules/Image/encodings/avs.c:86
86 ((struct image *)io->storage)->img[c] = pix;
(gdb) bt
#0 0x40416bd5 in image_avs_f__decode (args=1)
at /home/mirar/pike/src/modules/Image/encodings/avs.c:86
#1 0x40416dbc in image_avs_f_decode (args=1)
at /home/mirar/pike/src/modules/Image/encodings/avs.c:99
#2 0x8080e91 in mega_apply (type=APPLY_SVALUE, args=1, arg1=0x83e02b4,
arg2=0x0) at /home/mirar/pike/src/interpret.c:1235
#3 0x807d5ad in eval_instruction_without_debug (pc=0x83ddae1 "H")
at /home/mirar/pike/src/interpreter.h:1569
#4 0x80819dc in o_catch (pc=0x83ddacc "n:d:d\017\b\232?:+ªi")
at /home/mirar/pike/src/interpret.c:805
#5 0x80777bf in eval_instruction_without_debug (pc=0x83ddac8 "(")
at /home/mirar/pike/src/interpreter.h:904
#6 0x8080ffa in mega_apply (type=APPLY_LOW, args=0, arg1=0x8335a94,
arg2=0x38)
at /home/mirar/pike/src/interpret.c:805
#7 0x807d38a in eval_instruction_without_debug (
pc=0x83de450
"p§9p§:p§;p§<p§=p§>p§?p§@p§Ap§Bp§Cp§Dp§Ep§Fp§Gp§Hp§Ip§Jp§Kn>\fD") at
/home/mirar/pike/src/interpreter.h:1542
#8 0x8080ffa in mega_apply (type=APPLY_LOW, args=0, arg1=0x8335a94,
arg2=0x4c)
at /home/mirar/pike/src/interpret.c:805
#9 0x807d38a in eval_instruction_without_debug (pc=0x83de4cc "n>ÓD")
at /home/mirar/pike/src/interpreter.h:1542
#10 0x8080ffa in mega_apply (type=APPLY_LOW, args=0, arg1=0x8335a94,
arg2=0x4d)
at /home/mirar/pike/src/interpret.c:805
#11 0x807d38a in eval_instruction_without_debug (pc=0x83de4e7 "n>ÕD")
at /home/mirar/pike/src/interpreter.h:1542
#12 0x8080ffa in mega_apply (type=APPLY_STACK, args=0, arg1=0x0, arg2=0x0)
at /home/mirar/pike/src/interpret.c:805
#13 0x807d5ad in eval_instruction_without_debug (pc=0x839a4fc
"d\0036\024\b")
at /home/mirar/pike/src/interpreter.h:1569
#14 0x8080ffa in mega_apply (type=APPLY_LOW, args=2, arg1=0x8335bb4,
arg2=0x4c)
at /home/mirar/pike/src/interpret.c:805
#15 0x8082697 in apply (o=0x8335bb4, fun=0x81d1559 "_main", args=2)
at /home/mirar/pike/src/interpret.c:1614
#16 0x80e246e in Return () at /home/mirar/pike/src/main.c:607
(gdb) list
81 rgb_group pix, apix;
82 apix.r = apix.g = apix.b = q[c*4+8];
83 pix.r = q[c*4+9];
84 pix.g = q[c*4+10];
85 pix.b = q[c*4+11];
86 ((struct image *)io->storage)->img[c] = pix;
87 ((struct image *)ao->storage)->img[c] = apix;
88 }
89 pop_n_elems(args);
90 push_constant_text("image");
(gdb) p io
$1 = (struct object *) 0x8335adc
(gdb) p *((struct image *)io->storage)
$3 = {img = 0x839c9b0, xsize = 100, ysize = 100, rgb = {r = 0 '\000',
g = 0 '\000', b = 0 '\000'}, alpha = 0 '\000'}
(gdb) p c
$4 = 1
(gdb) p *((struct image *)ao->storage)
$6 = {img = 0x83ea0e0, xsize = 100, ysize = 100, rgb = {r = 0 '\000',
g = 0 '\000', b = 0 '\000'}, alpha = 0 '\000'}