← Back to team overview

kicad-developers team mailing list archive

Re: Revision 3817 - netlist read and setvbuf


On 11/26/2012 03:05 AM, Marco Serantoni wrote:
> I wish to discuss about my patch #3817, that comes to me from some signalations of
> problems in cvpcb and i've applied that is a probably a dirt workaround for a more deep
> problem that i wish to describe.
> The code parsing the netlist does more or less this:
> [Reads the header to identify the netlist type]
> [Rewind the stream]
> [Creates a FILE_LINE_READER]
> ----> calls setvbuf
> [Proceed to parse the file]
> Brian Woodcox, the person that has signalated to me the problem in cvpcb, has also
> hinted to me that reading the documentation, the setvbuf call should be not used after
> calls: http://www.cplusplus.com/reference/cstdio/setvbuf/.
> That seems that doesn't create problems in Linux/Windows with their current
> implementation but being formal this could be spot as an error.
> So I personally think that my "dirty hack" could be collapsed for all platforms, do you
> agree ?

No.  The patch ends up not closing the file.

I have one in the works, which will fix it.  But I will need more time to finish it.  We
just had a holiday weekend here.



> Waiting for your feedbacks,
> --
> Marco
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp