[21.4] Patch for consistent crash with Linux native sound on AMD64

Aidan Kehoe kehoea at parhasard.net
Fri Dec 15 09:27:52 EST 2006


 Ar an t-aonú lá déag de mí na Nollaig, scríobh Hans de Graaff: 

 > On my AMD64 machine I can crash XEmacs 21.4.20 consistently by starting
 > xemacs and doing two page-ups. I'm using Linux native sound right now, and
 > that seems to be the problem. (I remember this crash from .19 as well but
 > didn't have time to investigate then.)
 > 
 > The following patch fixes things for me and makes sense since prtn and rrtn
 > are later recast as a size_t.

Yeah, there’s an unfortunate history with XEmacs and size_t, so a question:
does changing the declaration to long work as well?

 > Index: src/linuxplay.c
 > ===================================================================
 > RCS file: /pack/xemacscvs/XEmacs/xemacs/src/linuxplay.c,v
 > retrieving revision 1.13
 > diff -u -B -r1.13 linuxplay.c
 > --- src/linuxplay.c     2001/04/12 18:23:58     1.13
 > +++ src/linuxplay.c     2006/12/11 20:39:44
 > @@ -290,7 +290,8 @@
 >    fmtType        ffmt;
 >    int            fmt,speed,tracks;
 >    unsigned char *pptr,*optr,*cptr,*sptr;
 > -  int            wrtn,rrtn,crtn,prtn;
 > +  int            wrtn,crtn;
 > +  size_t            prtn,rrtn;
 >    unsigned char         sndbuf[SNDBUFSZ];
 >  
 >    /* We need to read at least the header information before we can start

-- 
“No one can guarantee that any course of action in Iraq at this point will
stop sectarian warfare, growing violence, or a slide toward chaos.”
(Iraq Study Group Report, Dec. 6, 2006)



More information about the XEmacs-Patches mailing list