Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [bug/fix] correction of a small bug in conf file parsing
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-06-20 18:17:29


Piotr --

Many thanks for the patch. Sorry, our lex is quite a bit rusty, and it took us quite a while to look at this. :-\

I have a few questions:

1. What happens if the file ends while in <comment>? E.g., if a the last line of the file is "/* Hello".

2. Does this same kind of fixup need to be applied to the 5 other flex files in the OMPI source tree?

On May 30, 2013, at 11:30 AM, Piotr Lesnicki <piotr.lesnicki_at_[hidden]> wrote:

> Hi,
>
> The parser of key/value configuration files (like
> 'openmpi-mca-params.conf') has some small bugs:
>
> - a parsing error occurs when there is no new line at the end of the
> file (and the error shows while reading the next conf file)
> - error messages display wrong line numbers
> - error messages show nothing meaninful when a new line replaces an
> expected token
>
> I attached a patch of the lex production rules of the keyval
> parser to correct this.
>
>
>
> # steps to reproduce (all versions):
> $ cp $OPAL_PREFIX/etc/openmpi-mca-params.conf .
> $ (head -n -1 openmpi-mca-params.conf ; tail -n1 openmpi-mca-params.conf | tr -d '\n') > params.conf
> $ export OMPI_MCA_mca_param_files=$PWD/params.conf
> $ mpicc -v
> [berlin73:00360] keyval parser: error 1 reading file /home_nfs/lesnickp/tmp/params.conf at line 160:
> #
> [berlin73:00360] keyval parser: error 1 reading file /home_nfs/lesnickp/local/openmpi-1.6.3/share/openmpi/mpicc-wrapper-data.txt at line 1:
> # There can be multiple blocks of configuration data, chosen by
> [...]
>
>
> --
> Piotr LESNICKI
> <lex.patch>_______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/