Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Fix parsing of envvars in MCA files #973

Merged
merged 3 commits into from
Mar 9, 2016
Merged

Commits on Feb 18, 2016

  1. Fix parsing of envvars in MCA files

    This commit fixes a memory corruption bug when parsing lines of the
    form:
    
    -x FOO=bar
    
    The code was making changes to the size of the buffer allocated for
    key_buffer without making the appropriate changes to
    key_buffer_len. This was causing subsequent calls to save_param_name
    to write to invalid memory.
    
    This commit makes the following changes:
    
      - Fix the above bug by modifying trim_name to move the string within
        the buffer instead of re-allocating space for the trimmed string.
    
      - Cleaned up both trim_name and save_param_name. Both functions took
        a prefix and suffix to trim. Problem was the prefix was not
        treated like a prefix. Instead the "prefix" was located inside the
        string using strstr then the trimmed value started after the
        substring (even in the middle of the string). To allow trimming
        both -x and --x (as well as -mca and --mca) trim_name is now
        called with each prefix.
    
    Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
    
    (cherry picked from commit open-mpi/ompi@3223673)
    
    Fixes open-mpi/ompi#1375
    
    Signed-off-by: Nathan Hjelm <hjelmn@me.com>
    hjelmn committed Feb 18, 2016
    Configuration menu
    Copy the full SHA
    9e587c9 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2016

  1. opal/util: fix bug in key value parser

    This commit fixes a bug in the opal key value parser that might cause
    the filename parser to go past the beginning of the string.
    
    Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
    
    (cherry picked from open-mpi/ompi@63bac9a)
    
    Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
    hjelmn committed Mar 8, 2016
    Configuration menu
    Copy the full SHA
    71291fd View commit details
    Browse the repository at this point in the history
  2. opal/keval_parse: fix conditional ordering

    Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
    
    (cherry picked from open-mpi/ompi@607be72)
    
    Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
    hjelmn committed Mar 8, 2016
    Configuration menu
    Copy the full SHA
    3fac7a8 View commit details
    Browse the repository at this point in the history