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

Re: [Xen-devel] [PATCH]: xl: don't segfault parsing disk configs, support NULL physpath and ioemu:



On Tue, 2010-12-14 at 17:40 +0000, Ian Jackson wrote:
> Gianni Tedesco writes ("[Xen-devel] [PATCH]: xl: don't segfault parsing disk 
> configs, support NULL physpath and ioemu:"):
> > Resending due to another user reported running in to this. Applies with
> > offsets.
> ...
> > Switch to a state machine parser since it's easier to handle all these
> > exotic cases without segfaulting. NULL physpaths are now allowed and a
> > dodgy hack is introduced to skip over the "ioemu:" prefix for a
> > virtpath. Also fixes a leak of buf2.
> 
> Thanks, but I think the last time we had this we had some negative
> feedback about the comprehensibility of this approach.

Yes... from you :)

> Perhaps a regexp- or flex- or bison- based approach would be better ?

ISTR you said you'd do it in flex but since:

1. people are running to the bugs "out in the world"
2. we have an existing fix
3. I have no flex-fu
4. and we were in agreement that this code is as readable or more-so
   than a correct strtok-based implementation

then why not take the fix we have now and improve if/when we need to in
the future? Evidently nobody has touched this code for 6 months or more.

> Ian.

Gianni


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.