xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] [PATCH 1/2] Fix segfault with 'Game List Tags' dialog


From: Thomas Adam
Subject: Re: [XBoard-devel] [PATCH 1/2] Fix segfault with 'Game List Tags' dialogue
Date: Fri, 20 Mar 2015 23:06:26 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Mar 20, 2015 at 11:40:34PM +0100, H.G. Muller wrote:
> Hi Thomas,

Hi,

> indeed, this was a bug that crept in whith the patch to immediately update
> the game list
> after format change, rather than only after the user closed and re-opened
> it, or applied a new filter.
> I had already hit upon and fixed it in my own repository on March 4, in a
> slightly different way
> ( http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=xboard.git;a=summary ).

I see---it seems a little... hmm, odd, that the presense of the dialogue
is the thing to check.  That there is no data in glc seems the more
technically correct thing to check for.

> As to your previous mail:
> 
> Personally I don't care much about standards, and when the compiler eats the
> code without complaints,
> I am happy. I was raised with K&R C, and I just adapt my style to the
> environment where I am patching.
> It never bothered me that this is different in different places, and would
> not really know the
> difference between C89 and C99 anyway.

It bothers me, because it's crufty, and often that looks bad, especially
in terms of code structure, etc.

> If anyone  would want to clean up the code a little in that respect I would
> not mind,
> I just would not consider it something worth spending time on myself.

I'm starting this already [1], there's a few topic branches where I've
been able to make a start.  It's actually rather nice doing this because
it's already flagged up a lot of interesting points which are on my
radar, for instance these things (in no particular order):

* if (f) free(f) -- free(NULL) is guaranteed to be a no-op;
* free() versus FREE() versus free(f); f = NULL;
* [cm]alloc() -> snprintf() -- just use asprintf();
* strcpy / etc.


> And I am currently a bit behind pushing the latest developments to Savannah.
> (They still need to be cleaned up a bit, while I should also check whether
> they break WinBoard,
> before I do that.)

That was a question I had:  I do not have access to a windows PC.  How
do you ensure changes made doesn't break Winboard?  Indeed, whilst I
might *just* about be able to cross-compile it under Linux, I certainly
couldn't check the run-time results.  So any thing I do would only be
with respect to XBoard itself.

> Code cleanups like you propose are likely to cause changes everywhere, which
> would make it thoroughly
> impossible to merge all the patches now on hgm.nubati.net into the master
> branch on Savannah.

I'm chunking up the changes as best I can, obviously, but yes, there
might be some overlap, etc.

> So we should be a little careful here, and if you really want to work on
> this, I should bring the
> Savannah repository up to date as quickly as possible. Otherwise we would
> fork the development
> in irreconcilable branches, one cleaned up but obsolete, the other still a
> mess but fully functional.

If you would, I'd appreciate that, as I have already started.

> Unfortunately I have not been able to work as much as I would have liked on
> XBoard lately,
> because my wife has broken her leg a few month ago, and is still
> revalidating. This is why I am
> so much behind pushing stuff to Savannah.

Oh dear, I'm so sorry to hear that.  I hope she has a speedy recovery,
and that the leg doesn't take too much time to heal.

-- Thomas Adam

[1]  https://github.com/ThomasAdam/xboard

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]