Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2536

segfault when using getvalues() with some double-index arrays

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.10.0, 3.10.0b1
    • Fix Version/s: 3.12.0, 3.10.4
    • Component/s: None

      Description

      Example policy:

      This segfaults:

      bundle agent main
      {
        vars:
            "array[key1]" string => "k1v"; 
            "array[key1][subkey1]" string => "k1s1v";
      
            "array_values" slist => getvalues("array");
      
        reports:
          "array_values = $(array_values)";
      }
      

      But this does not

        bundle agent main
        {
          vars:
            "array[key1][key2]" string => "blah";
            "v" slist => getvalues(array);
      
          reports: "$(v)";
        }
      

      This was identified via the acceptance tests that Nick Anderson submitted in pull request 2765.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vpodzime Vratislav Podzimek
                Reporter:
                a10038 jimis (Dimitrios Apostolou)
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel