On Fri, 21 Apr 2006 20:33:07 -0700 (PDT), Jurij Smakov said: > Hi, On sparc this clearly looks like an alignment problem. The > decode() function mentioned in the backtrace above is supposed to do > the right thing depending on whether alignment on word boundary for > ints is required. The need for such alignment is tested during > 'configure' run and is recorded in NEED_WORD_ALIGNMENT variable in > Source/config.h (and other places probably). The problem is that on > sparc this test is not triggered as it should, so the > NEED_WORD_ALIGNMENT is set to zero. [...snip...]
Hi Jurij, Wow, thanks for all your work. Can you try using the attached file as config/config.align.c? I've just added a call to "puts" to force the compiler to not optimize out the assignments. (Fortunately, the compiler isn't smart enough to know that the assignments are still useless.) Thanks again.
/* This program will most likely crash on systems that need shorts and ints to be word aligned Copyright (C) 2005 Free Software Foundation Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ #include <stdio.h> int main () { char buf[12]; short sval = 4; int ival = 3; *(short *)(buf+1) = sval; *(int *)(buf+1) = ival; buf[0] = 0; puts (buf); /* force compiler to not optimize out the above assignments */ exit (0); }
-- Hubert Chan - email & Jabber: [EMAIL PROTECTED] - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA (Key available at wwwkeys.pgp.net) Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA