opnsense-src/tools/regression/bin/sh/execution/func1.0
Jilles Tjoelker eb33e843b8 sh: Fix crash when undefining or redefining a currently executing function.
Add a reference count to function definitions.
Memory may leak if multiple SIGINTs arrive in interactive mode,
this will be fixed later by changing SIGINT handling.

PR:		bin/137640
2009-08-23 21:09:46 +00:00

4 lines
118 B
Text

# $FreeBSD$
MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' &&
MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g'