diff options
author | jilles <jilles@FreeBSD.org> | 2009-08-23 21:09:46 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-08-23 21:09:46 +0000 |
commit | 4a8e08a1103988b9e44d3ae9584cd654796998b1 (patch) | |
tree | 907e1a91ca6ca57f1742a6081e71d2fcd1f405a4 /tools/regression | |
parent | f0ee7a159b9f49405e827b40fed36a844334c3ac (diff) | |
download | FreeBSD-src-4a8e08a1103988b9e44d3ae9584cd654796998b1.zip FreeBSD-src-4a8e08a1103988b9e44d3ae9584cd654796998b1.tar.gz |
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
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/bin/sh/execution/func1.0 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/execution/func1.0 b/tools/regression/bin/sh/execution/func1.0 new file mode 100644 index 0000000..317b005 --- /dev/null +++ b/tools/regression/bin/sh/execution/func1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ + +MALLOC_OPTIONS=J sh -c 'g() { g() { :; }; :; }; g' && +MALLOC_OPTIONS=J sh -c 'g() { unset -f g; :; }; g' |