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: Piotr Lesnicki (piotr.lesnicki_at_[hidden])
Date: 2013-06-21 07:40:21


Hi,

1) you are right, an eof in the middle of a <comment> section must be
    handled explicitly, otherwise it ends by an unrelated error later,
    just as it currently does. By the way, here it ends with
    [no-options-error] which has no corresponding message in
    'help-opal-wrapper.txt'.

    I joined the patch to correct this <comment> problem.

2) indeed, other lex files have similar patterns to 'keyval_lex.l', so
    we should correct them also. I will take a look at them.

Thanks,

Piotr

Le 21/06/2013 00:17, Jeff Squyres (jsquyres) a écrit :
> 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
>