Template user metric infinite recurse

.. the template user metric defined a count { } user metric
   function that also used the builtin count() function, but
   at runtime the user defined function is called causing an
   infinite recurse.

.. it is right that user metrics can override builtin functions
   but is very unfortunate that the count function is named this
   way.

.. most users likely will never encounter this- but will cause a
   SEGV stack overflow.
This commit is contained in:
Mark Liversedge
2022-06-25 23:13:57 +01:00
parent e602ba4d31
commit 66275c6c21

View File

@@ -1950,7 +1950,7 @@ CustomMetricsPage::addClicked()
\n\
# calculate metric value at end\n\
value { mean(samples(POWER)); }\n\
count { count(samples(POWER)); }\n\
count { Duration; }\n\
}";
EditUserMetricDialog editor(this, context, here);