mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-17 07:50:04 +00:00
Kernel: Perform exec-into-new-image directly in sys$execve()
This ensures that everything allocated on the stack in Process::exec() gets cleaned up. We had a few leaks related to the parsing of shebang (#!) executables that get fixed by this.
This commit is contained in:
parent
c7dbe27781
commit
0e72b04e7d
Notes:
sideshowbarker
2024-07-17 20:55:48 +09:00
Author: https://github.com/awesomekling
Commit: 0e72b04e7d
3 changed files with 39 additions and 44 deletions
|
@ -438,7 +438,7 @@ public:
|
|||
NonnullOwnPtrVector<KString> const& arguments() const { return m_arguments; };
|
||||
NonnullOwnPtrVector<KString> const& environment() const { return m_environment; };
|
||||
|
||||
ErrorOr<void> exec(NonnullOwnPtr<KString> path, NonnullOwnPtrVector<KString> arguments, NonnullOwnPtrVector<KString> environment, int recursion_depth = 0);
|
||||
ErrorOr<void> exec(NonnullOwnPtr<KString> path, NonnullOwnPtrVector<KString> arguments, NonnullOwnPtrVector<KString> environment, Thread*& new_main_thread, u32& prev_flags, int recursion_depth = 0);
|
||||
|
||||
ErrorOr<LoadResult> load(NonnullRefPtr<OpenFileDescription> main_program_description, RefPtr<OpenFileDescription> interpreter_description, const ElfW(Ehdr) & main_program_header);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue