TODO: Check memory allocation and freeing in kernel functions that manage signals #40
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: apio/Luna#40
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a thread has a signal pending which is has its disposition set to SIG_DFL and the default is to terminate the process, Thread::process_pending_signals() never returns (instead calling kernel_exit(), which then calls kernel_yield(), which completely leaves the current execution context).
Thus, anything on the stack will not get its destructor called, which could result in a memory leak. Maybe instead of checking Thread::will_invoke_signal_handler() a Thread::will_ignore_signal() function should be checked instead? Thus, SIG_DFL terminating signals will also short-circuit and exit the calling function (calling all destructors) before Thread::process_pending_signals() is called in a controlled environment.