On Mon 29 Jan 2018 at 15:40:28 +0700, Robert Elz wrote: > sh -c 'fn() { unset -f fn; echo done; }; fn' > > This just says "done" - but obviously when the "echo done" is performed, > fn has already been removed. You can test this with any NetBSD sh version. I tried it on a Linux bash with valgrind, and this reported an "Invalid free() / delete / delete[] / realloc()". But it still did this when I removed the "unset -f fn" so it is unrelated. -Olaf. -- ___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X \X/ rhialto/at/falu.nl -- are condemned to reinvent it. Poorly.
Attachment:
signature.asc
Description: PGP signature