Skip to content

Commit

Permalink
Template user metric infinite recurse
Browse files Browse the repository at this point in the history
.. 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.
  • Loading branch information
liversedge committed Jun 25, 2022
1 parent e602ba4 commit 66275c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gui/Pages.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 66275c6

Please sign in to comment.