From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12580 invoked from network); 18 Jan 2000 20:40:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2000 20:40:09 -0000 Received: (qmail 14206 invoked by alias); 18 Jan 2000 20:40:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9357 Received: (qmail 14198 invoked from network); 18 Jan 2000 20:40:04 -0000 To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: zsh problems on sparc: fixed In-reply-to: "Chmouel Boudjnah"'s message of "18 Jan 2000 21:13:10 +0100." Date: Tue, 18 Jan 2000 20:42:26 +0000 From: Peter Stephenson Message-Id: Chmouel Boudjnah wrote: > Peter Stephenson writes: > > > I've put this in the MACHINES file, but it would be nice to know a bit more > > about what Solaris systems > > no solaris installed, linux : Ah, I've been chasing up a gum tree looking on Solaris 5.6, then, where there's no problem. It's presumably the same problem reported by Clint, or a version of it. If that's the case, try moving the 'data' element of 'struct qual' around line 108 in glob.c to be the first element of the struct. It shouldn't be necessary with gcc, but it's the first workaround that comes to mind. To be on the safe side, better rewrite struct gmatch too --- here's a patch. The compiler's supposed to handle this if the struct itself is properly aligned anyway, so it's still possible the memory allocator isn't returning 64-bit aligned quantities for some reason which would need further investigation. > Date: Thu, 30 Dec 1999 17:43:30 -0500 > From: Clint Adams > Subject: reproducible bus error > > On UltraSPARC Linux zsh (compiled 32-bit) experiences a bus error > when trying to execute this line (1320) in Src/glob.c: > > qn->data = data; > > I notice that off_t data has ALIGN64. Is that relevant or > is something else going on here? Index: Src/glob.c =================================================================== RCS file: /home/pws/CVSROOT/projects/zsh/Src/glob.c,v retrieving revision 1.2 diff -u -r1.2 glob.c --- Src/glob.c 1999/12/03 19:12:10 1.2 +++ Src/glob.c 2000/01/18 20:37:41 @@ -41,13 +41,13 @@ typedef struct gmatch *Gmatch; struct gmatch { - char *name; off_t size ALIGN64; + off_t _size ALIGN64; + char *name; long atime; long mtime; long ctime; long links; - off_t _size ALIGN64; long _atime; long _mtime; long _ctime; @@ -102,10 +102,10 @@ typedef int (*TestMatchFunc) _((char *, struct stat *, off_t, char *)); struct qual { + off_t data ALIGN64; /* Argument passed to function */ struct qual *next; /* Next qualifier, must match */ struct qual *or; /* Alternative set of qualifiers to match */ TestMatchFunc func; /* Function to call to test match */ - off_t data ALIGN64; /* Argument passed to function */ int sense; /* Whether asserting or negating */ int amc; /* Flag for which time to test (a, m, c) */ int range; /* Whether to test <, > or = (as per signum) */ -- Peter Stephenson