I'm not sure it is only a 64-bit problem. I have this
[root@hobbes ~]# cat /proc/version Linux version 2.6.25.14-108.fc9.x86_64 (mockbuild@) (gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) ) #1 SMP Mon Aug 4 13:46:35 EDT 2008 [root@hobbes ~]#
[root@hobbes ~]# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 107 model name : AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
but mine didn't fail:
[riffraff@hobbes Pike-v7.8.8]$ pike Pike v7.8 release 8 running Hilfe v3.5 (Incremental Pike Frontend)
Image.TIFF;
(1) Result: _Image_TIFF
string s=Stdio.read_bytes("/usr/share/sane/xsane/doc/xsane-restore.jpg"); object i=Image.JPEG.decode(s); i;
(2) Result: Image.Image( 26 x 26 /* 2.0Kb */)
Image.JPEG.encode(i);
(3) Result: "\377\330\377\340\0\20JFIF\0\1\1\0\0\1\0\1\0\0\377\333\0C\0\b\6\6\a\6\5\b\a\a\a\t\t\b\n" ...
----- Original Message ---- From: "Mirar @ Pike developers forum" 10353@lyskom.lysator.liu.se To: pike-devel@lists.lysator.liu.se Sent: Thursday, August 14, 2008 8:15:03 AM Subject: 7.8 alpha 2
That it's a 64-bit-only problem, I mean.
Hmm. But...
| > string s = Stdio.read_bytes("sugar.jpg"); | > object i = Image.JPEG.decode(s); | >> i; | (1) Result: Image.Image( 300 x 300 /* 263.7Kb */) | > Image.JPEG.encode(i); | *** glibc detected *** pike: munmap_chunk(): invalid pointer: 0x0000000000a9b5d0 | *** | ======= Backtrace: ========= | /lib/libc.so.6(cfree+0x1b6)[0x2ba515677d46] | /usr/lib/libjpeg.so.62[0x2ba516a52ffa] | /usr/lib/libjpeg.so.62(jpeg_abort+0x15)[0x2ba516a52505] | /usr/local/pike/7.7.133/lib/modules/_Image_JPEG.so[0x2ba51681b888] | pike(low_mega_apply+0x598)[0x434908] | ...
It doesn't crash with all images, which is another fun part. It works perfectly with around 90% of the images I've tried. (Hence the link to the test image.)
I'd like to rule out a broken libjpeg. Anyone got a link to a jpeglib-6b source?
pike-devel@lists.lysator.liu.se