During the various rewrites, this check got lost, and caused
arity-1 putatively-/*stable*/ functions to be recognized in
pass 2 but cause a SEGV in pass 3.
functiondecl* fn = (*it).second;
stable_analysis sa;
fn->body->visit(&sa);
- if (sa.stable)
+ if (sa.stable && fn->formal_args.size() == 0)
stable_fcs.insert(fn->name);
}
--- /dev/null
+#! stap -gp4
+
+function foo (a) %{ /* stable */ /* pure */ /* unmodified-fnargs */ STAP_RETURN(STAP_ARG_a); %}
+function foo2() %{ /* stable */ /* pure */ /* unmodified-fnargs */ STAP_RETURN("hi"); %}
+probe begin { log(foo("hello")) log(foo2()) }