[PATCH xserver (v2)] X Sync Cleanups

James Jones jajones at nvidia.com
Mon Dec 20 11:08:39 PST 2010


On Monday 20 December 2010 10:36:58 am Keith Packard wrote:
> * PGP Signed by an unknown key
> 
> On Mon, 20 Dec 2010 10:27:57 -0800, James Jones <jajones at nvidia.com> wrote:
> > +static Bool
> > +SyncCheckWarnIsCounter(const SyncObject* pSync, const char *warning)
> > +{
> > +    if (pSync && (SYNC_COUNTER != pSync->type))
> > +    {
> > +	ErrorF("%s", warning);
> > +	ErrorF("         Counter type: %d\n", pSync->type);
> > +	return FALSE;
> > +    }
> > +
> > +    return TRUE;
> > +}
> 
> This doesn't throttle warning messages. If there is a bug in the server,
> I'd imagine it'd get hit over and over again, meaning that your server
> log file will get filled with these messages.

Err, somehow I forgot to do that.  Fixed in the third version.  I went with a 
cap of 5 rather than just printing the message once.  My reasoning being this 
might help differentiate between random memory corruption and a legitimate 
error in the sync code.  Tested by purposely corrupting a few sync objects in 
the debugger.

Thanks,
-James


More information about the xorg-devel mailing list