Package: gamera
Version: 3.2.3-1
Severity: grave
Justification: renders package unusable on sparc

Gamera has unaligned access issues on sparc:


$ gdb --quiet --args python2.6
Reading symbols from /usr/bin/python2.6...Reading symbols from 
/usr/lib/debug/usr/bin/python2.6...done.
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python2.6
[Thread debugging using libthread_db enabled]
Python 2.6.4+ (r264:75706, Feb 16 2010, 04:55:39)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from gamera.core import *
init_gamera()
image = load_image('/usr/share/gamera/test/OneBit_generic.tiff')
image.black_area()

Program received signal SIGBUS, Bus error.
black_area<Gamera::ImageView<Gamera::ImageData<unsigned short> > > (self=<value 
optimized out>, args=0xf7a53b50) at include/plugins/features.hpp:42
42          *buf = 0;
Current language:  auto
The current source language is "auto; currently c++".
(gdb) up
#1  call_black_area (self=<value optimized out>, args=0xf7a53b50) at 
/home/jwilk/gamera-3.2.4/gamera/plugins/_features.cpp:118
118     black_area(*((OneBitImageView*)self_arg), feature_buffer);break;
(gdb) print feature_buffer
$1 = (Gamera::feature_t *) 0xf758b874


Note that feature_buffer pointer is not aligned to 8 bytes boundary as it should. The culprit is the following part of C code generator (gamera/generate.py):


           if (offset < 0) {
             str = PyString_FromStringAndSize(NULL, 
[[function.return_type.length]] * sizeof(feature_t));
             feature_buffer = (feature_t*)PyString_AsString(str);
           } else {
           ...
           }
           [[args[0].call(function, args[1:], [])]]


--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to