-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak(s) when modifying PATH
in various contexts
#405
Labels
bug
Something is not working
Comments
McDutchie
changed the title
Memory leak(s) when assigning to
Memory leak(s) when modifying Dec 27, 2021
PATH
in various contextsPATH
in various contexts
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
atheik
added a commit
to atheik/ksh
that referenced
this issue
Mar 27, 2022
src/cmd/ksh93/sh/subshell.c: nv_subsaved(): - Before freeing node, check whether the corresponding dictionary entry has a discipline function and free it if applicable. Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Mar 27, 2022
src/cmd/ksh93/sh/subshell.c: nv_subsaved(): - Before freeing list item, check whether the node in its dictionary entry has a discipline function and free it if it is designated to be freed. Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Apr 5, 2022
src/cmd/ksh93/sh/path.c: - Stop calling path_dup() on defpathinit() return value as it immediately raises the reference count of the path components to 2 and makes it such that a single path_delete() is not sufficient for freeing the path components. The path_dup() call in path_addpath() which caused the leak was last strictly necessary probably in ksh93o. Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Apr 5, 2022
src/cmd/ksh93/sh/array.c: - ??? Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Jun 20, 2022
src/cmd/ksh93/sh/subshell.c: nv_subsaved(): - Before freeing list item, check whether the node in its dictionary entry has a discipline function and free it if it is designated to be freed. Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Jun 20, 2022
src/cmd/ksh93/sh/path.c: - Stop calling path_dup() on defpathinit() return value as it immediately raises the reference count of the path components to 2 and makes it such that a single path_delete() is not sufficient for freeing the path components. The path_dup() call in path_addpath() which caused the leak was last strictly necessary probably in ksh93o. Progresses: ksh93#405
atheik
added a commit
to atheik/ksh
that referenced
this issue
Jun 20, 2022
src/cmd/ksh93/sh/array.c: - ??? Progresses: ksh93#405
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These regression tests leak:
ksh/src/cmd/ksh93/tests/leaks.sh
Lines 355 to 368 in 5422af4
ksh/src/cmd/ksh93/tests/leaks.sh
Lines 376 to 394 in 5422af4
I don't know if these are all different leaks, all the same leak, or neither.
Relevant results on macOS when running
DEBUG=y bin/shtests -p leaks
:The text was updated successfully, but these errors were encountered: