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

Low-level C error reported for certain calls of "variablesmatching()"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Higher
    • Resolution: Fixed
    • Affects Version/s: 3.7.3, 3.7.6
    • Fix Version/s: 3.10.0
    • Component/s: Evaluation
    • Labels:

      Description

      When "variablesmatching()" is used to define an slist, but the pattern passed also matches the name of the slist itself which is being defined, CFEngine crashes with a low-level C error.

      I discovered this in 3.7.3 as shown, but also tested it in 3.9.1 with the same results.

      # cf-agent -V
      CFEngine Core 3.7.3
      CFEngine Enterprise 3.7.3
      # cat test.cf
      bundle agent my_special_bundle {
        vars:
          "some_var"
            string => "some value";
       
          "make_cfe_crash"
            slist => variablesmatching("default:my_special_bundle\..*");
       
        reports:
          "DEBUG: '$(make_cfe_crash)' = '$($(make_cfe_crash))'";
      }
      # cf-agent -KIC -f ./test.cf -b my_special_bundle
          info: Using command line specified bundlesequence
      expand.c:872: Programming Error: Couldn't find extracted variable 'default*my_special_bundle#default*my_special_bundle#make_cfe_crash'
      #
      

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              mweilgart Mike Weilgart
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel